Lines Matching defs:drive
138 /* Get the geometry of a drive DRIVE. */
140 get_drive_geometry (struct geometry *geom, char **map, int drive)
146 fd = open (map[drive], O_RDONLY);
257 if (drive & 0x80)
428 get_dac960_disk_name (char *name, int controller, int drive)
430 sprintf (name, "/dev/rd/c%dd%d", controller, drive);
484 /* Check if DEVICE is a CD-ROM drive by the HDIO_GETGEO ioctl. */
550 int drive;
578 show_error (line_number, "Bad drive name");
586 drive = strtoul (ptr, &ptr, 10);
587 if (drive < 0)
592 else if (drive > 127)
596 is_floppy ? 'f' : 'h', drive);
601 drive += 0x80;
626 /* Multiple entries for a given drive is not allowed. */
627 if (map[drive])
633 map[drive] = strdup (ptr);
634 assert (map[drive]);
804 /dev/rd/c<controller>d<logical drive>p<partition>.
809 int controller, drive;
813 for (drive = 0; drive < 15; drive++)
817 get_dac960_disk_name (name, controller, drive);
859 is_disk_device (char **map, int drive)
863 assert (map[drive] != 0);
864 assert (stat (map[drive], &st) == 0);
870 write_to_partition (char **map, int drive, int partition,
884 assert (map[drive] != 0);
886 strcpy (dev, map[drive]);