Xref: utzoo unix-pc.general:2012 comp.sys.att:5135 Path: utzoo!utgpu!watmath!clyde!att!ttrdc!ttrde!pfales From: pfales@ttrde.UUCP (Peter Fales) Newsgroups: unix-pc.general,comp.sys.att Subject: Looks like a bug in the 7300 disk driver Message-ID: <813@ttrde.UUCP> Date: 9 Jan 89 15:49:55 GMT Organization: AT&T, Skokie, IL Lines: 39 I have discovered what appears to be a bug in the hard disk device driver for the unix-pc. To demonstrate the bug, open the device "/dev/rfp000", using open(2) and read four bytes (one int) using read(2). The read will actually return 512 bytes! However, if "/dev/fp000" is used, the correct value of 4 is returned. I am using version 3.51 of the operating system. If anyone wants to try out the following program on another version of the operating system I would be interested in their results: ---------------------------------- cut here ----------------------------- #include #include int disk; main(argc, argv) char *argv[]; { int i,x[1024]; disk=open("/dev/rfp000",O_RDONLY); if ( disk == -1 ) { fprintf(stderr,"Unable to open device /dev/rfp000\n"); exit(2); } printf("File is %d\n",disk); i=read(disk,x,sizeof(int)); printf("Read returned %d\n",i); printf("First four ints are %x, %x, %x, %x\n",x[0],x[1],x[2],x[3]); } -- Peter Fales AT&T, Room 2F-217 200 Park Plaza UUCP: ...att!ttrde!pfales Naperville, IL 60566 Domain: pfales@ttrde.att.com work: (312) 416-5357