]> err.no Git - linux-2.6/blobdiff - drivers/s390/block/dasd_proc.c
Automatic merge of rsync://rsync.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata...
[linux-2.6] / drivers / s390 / block / dasd_proc.c
index 353d41118c62916b659cbf065c3894f2c86185c5..d7f19745911f09b4fa391e450a7d18da2d0d60f7 100644 (file)
@@ -9,7 +9,7 @@
  *
  * /proc interface for the dasd driver.
  *
- * $Revision: 1.30 $
+ * $Revision: 1.31 $
  */
 
 #include <linux/config.h>
@@ -54,6 +54,7 @@ dasd_devices_show(struct seq_file *m, void *v)
 {
        struct dasd_device *device;
        char *substr;
+       int feature;
 
        device = dasd_device_from_devindex((unsigned long) v - 1);
        if (IS_ERR(device))
@@ -77,7 +78,10 @@ dasd_devices_show(struct seq_file *m, void *v)
        else
                seq_printf(m, " is ????????");
        /* Print devices features. */
-       substr = test_bit(DASD_FLAG_RO, &device->flags) ? "(ro)" : " ";
+       feature = dasd_get_feature(device->cdev, DASD_FEATURE_READONLY);
+       if (feature < 0)
+               return 0;
+       substr = feature ? "(ro)" : " ";
        seq_printf(m, "%4s: ", substr);
        /* Print device status information. */
        switch ((device != NULL) ? device->state : -1) {