Fix for a bug I introduced when I cleaned up atacontrol: Don't terminate
if we are listing devices, a controller might legitimately not be there. Submitted by: "Andrey V. Elsukov" <bu7cher@yandex.ru>
This commit is contained in:
parent
246edbe9f2
commit
c9d3114663
@ -265,9 +265,11 @@ info_print(int fd, int channel, int prchan)
|
||||
|
||||
devices.channel = channel;
|
||||
|
||||
if (ioctl(fd, IOCATADEVICES, &devices) < 0)
|
||||
err(1, "ioctl(IOCATADEVICES)");
|
||||
|
||||
if (ioctl(fd, IOCATADEVICES, &devices) < 0) {
|
||||
if (!prchan)
|
||||
err(1, "ioctl(IOCATADEVICES)");
|
||||
return;
|
||||
}
|
||||
if (prchan)
|
||||
printf("ATA channel %d:\n", channel);
|
||||
printf("%sMaster: ", prchan ? " " : "");
|
||||
|
Loading…
x
Reference in New Issue
Block a user