aboutsummaryrefslogtreecommitdiffstats
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 @@
9 * 9 *
10 * /proc interface for the dasd driver. 10 * /proc interface for the dasd driver.
11 * 11 *
12 * $Revision: 1.30 $ 12 * $Revision: 1.31 $
13 */ 13 */
14 14
15#include <linux/config.h> 15#include <linux/config.h>
@@ -54,6 +54,7 @@ dasd_devices_show(struct seq_file *m, void *v)
54{ 54{
55 struct dasd_device *device; 55 struct dasd_device *device;
56 char *substr; 56 char *substr;
57 int feature;
57 58
58 device = dasd_device_from_devindex((unsigned long) v - 1); 59 device = dasd_device_from_devindex((unsigned long) v - 1);
59 if (IS_ERR(device)) 60 if (IS_ERR(device))
@@ -77,7 +78,10 @@ dasd_devices_show(struct seq_file *m, void *v)
77 else 78 else
78 seq_printf(m, " is ????????"); 79 seq_printf(m, " is ????????");
79 /* Print devices features. */ 80 /* Print devices features. */
80 substr = test_bit(DASD_FLAG_RO, &device->flags) ? "(ro)" : " "; 81 feature = dasd_get_feature(device->cdev, DASD_FEATURE_READONLY);
82 if (feature < 0)
83 return 0;
84 substr = feature ? "(ro)" : " ";
81 seq_printf(m, "%4s: ", substr); 85 seq_printf(m, "%4s: ", substr);
82 /* Print device status information. */ 86 /* Print device status information. */
83 switch ((device != NULL) ? device->state : -1) { 87 switch ((device != NULL) ? device->state : -1) {