vserver 2.0 rc7
[linux-2.6.git] / drivers / s390 / block / dasd_proc.c
index 353d411..d7f1974 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) {