diff options
author | Horst Hummel <horst.hummel@de.ibm.com> | 2005-05-01 08:58:59 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-01 08:58:59 -0700 |
commit | f24acd4503270ed4c842c8fef0b71105285e0a06 (patch) | |
tree | 9125df60bf98ddcd8197bf479e8a48d22f51af14 /drivers/s390/block/dasd_proc.c | |
parent | e8f0641ef74eaa71ed9aa9d19c4b741c2143d752 (diff) |
[PATCH] s390: dasd readonly attribute
The independent read-only flags in devmap, dasd_device and gendisk are not
kept in sync. Use one bit per feature in the dasd driver and keep that bit in
sync with the gendisk bit.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/s390/block/dasd_proc.c')
-rw-r--r-- | drivers/s390/block/dasd_proc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/s390/block/dasd_proc.c b/drivers/s390/block/dasd_proc.c index 353d41118c6..d7f19745911 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) { |