summaryrefslogtreecommitdiff
path: root/drivers/s390/block/dasd_proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/block/dasd_proc.c')
-rw-r--r--drivers/s390/block/dasd_proc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/s390/block/dasd_proc.c b/drivers/s390/block/dasd_proc.c
index 353d41118c62..d7f19745911f 100644
--- a/drivers/s390/block/dasd_proc.c
+++ b/drivers/s390/block/dasd_proc.c
@@ -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) {