Lines Matching defs:device
169 perror_msg("device has more than 2^32 sectors, can't use all of them");
339 /* Read the Master Boot sector of the device for the
344 static int read_mbr(char *device, int validate)
348 fd = open(device, O_RDWR);
350 perror_msg("can't open '%s'",device);
354 disk_device = strdup(device);
499 //Print device details
1401 static int disk_proper(const char *device)
1404 int fd = open(device, O_RDONLY);
1414 length = strlen(device);
1415 if (length != 0 && isdigit(device[length - 1])) return 0;
1439 * for partitions on each device
1444 char *name = toybuf, *buffer = toybuf + ONE_K, *device = toybuf + 2048;
1454 sprintf(device,"/dev/%s",name);
1455 if (disk_proper(device)) {
1456 if (read_mbr(device, 0)) continue;