summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sbin/atacontrol/atacontrol.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sbin/atacontrol/atacontrol.c b/sbin/atacontrol/atacontrol.c
index 590b29c..030f825 100644
--- a/sbin/atacontrol/atacontrol.c
+++ b/sbin/atacontrol/atacontrol.c
@@ -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 ? " " : "");
OpenPOWER on IntegriCloud