Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
}
static void
-try(char *device, int user_specified) {
+try(char *device)
+{
int gb;
disk_device = device;
if (setjmp(listingbuf))
return;
- if (!user_specified)
- if (is_ide_cdrom_or_tape(device))
- return;
gpt_warning(device);
if ((fd = open(disk_device, type_open)) >= 0) {
gb = get_boot(try_only);
if (is_whole_disk(devname)) {
char *cn = canonicalize_path(devname);
if (cn) {
- try(cn, 0);
+ try(cn);
free(cn);
}
}
dummy(&k);
listing = 1;
for (k = optind; k < argc; k++)
- try(argv[k], 1);
+ if (!is_ide_cdrom_or_tape(argv[k]))
+ try(argv[k]);
} else {
/* we no longer have default device names */
/* but we can use /proc/partitions instead */