Lines Matching defs:fd
142 int fd;
146 fd = open (map[drive], O_RDONLY);
147 assert (fd >= 0);
150 fd = geom->flags;
161 if (ioctl (fd, HDIO_GETGEO, &hdg))
164 if (ioctl (fd, BLKGETSIZE, &nr))
185 if(ioctl (fd, DIOCGSECTORSIZE, §or_size) != 0)
188 if (ioctl (fd, DIOCGMEDIASIZE, &media_size) != 0)
193 if (ioctl (fd, DIOCGFWSECTORS, &tmp) == 0)
197 if (ioctl (fd, DIOCGFWHEADS, &tmp) == 0)
218 if (ioctl (fd, DIOCGDINFO, &hdg))
234 if (ioctl(fd, DKIOCG_PHYGEOM, &dkg))
271 if (! fstat (fd, &st) && st.st_blocks)
280 close (fd);
310 sprintf (name, "/dev/fd%d", unit);
313 sprintf (name, "/dev/fd%d", unit);
317 sprintf (name, "/dev/fd%d", unit);
329 sprintf (name, "/dev/fd%d", unit);
358 int fd;
361 fd = opendisk (shortname, O_RDONLY, name,
365 close (fd);
401 int fd;
404 fd = opendisk (shortname, O_RDONLY, name,
408 close (fd);
697 fprintf (fp, "(fd%d)\t%s\n", i, name);
874 int fd;
895 fd = open (dev, O_RDWR);
896 if (fd < 0)
913 if (_llseek (fd, offset >> 32, offset & 0xffffffff, &result, SEEK_SET))
923 if (lseek (fd, offset, SEEK_SET) != offset)
931 if (write (fd, buf, size * SECTOR_SIZE) != (size * SECTOR_SIZE))
933 close (fd);
939 close (fd);