Arnaud Houdelette wrote:
Try this patch.

Works fine:
[carenath] /usr/src/sbin/atacontrol# atacontrol list
ATA channel 0:
   Master:  ad0 <Maxtor 6Y120L0/YAR41BW0> ATA/ATAPI revision 7
   Slave:       no device present
ATA channel 2:
   Master:  ad4 <MAXTOR STM3250820AS/3.AAE> Serial ATA II
   Slave:       no device present
ATA channel 3:
   Master:  ad6 <MAXTOR STM3250820AS/3.AAE> Serial ATA II
   Slave:       no device present
ATA channel 4:
   Master:  ad8 <MAXTOR STM3250820AS/3.AAE> Serial ATA II
   Slave:       no device present
ATA channel 5:
   Master: ad10 <MAXTOR STM3250820AS/3.AAE> Serial ATA II
   Slave:       no device present

I just filled in a PR (kern/122847) as advised by Jeremy Chadwick. What should I do with it ?
Thanks for your help.

I made it simplest :)
Soren, what you think about it? The problem was introduced here:
http://www.freebsd.org/cgi/cvsweb.cgi/src/sbin/atacontrol/atacontrol.c.diff?r1=1.45;r2=1.46

--
WBR, Andrey V. Elsukov
Index: src/sbin/atacontrol/atacontrol.c
===================================================================
RCS file: /ncvs/src/sbin/atacontrol/atacontrol.c,v
retrieving revision 1.47
diff -u -p -r1.47 atacontrol.c
--- src/sbin/atacontrol/atacontrol.c    17 Mar 2008 10:33:23 -0000      1.47
+++ src/sbin/atacontrol/atacontrol.c    17 Apr 2008 12:11:38 -0000
@@ -265,9 +265,11 @@ info_print(int fd, int channel, int prch
 
        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 ? "    " : "");
_______________________________________________
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to