summaryrefslogtreecommitdiffstats
path: root/drivers/s390/block/dasd.c
diff options
context:
space:
mode:
authorHorst Hummel <horst.hummel@de.ibm.com>2007-04-27 16:01:47 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2007-04-27 16:01:44 +0200
commit4dfd5c4593e69e9d399dd9e01d184dc534408f7e (patch)
tree3f148b0c30de75b8ec3a43b247da9d06b24573bc /drivers/s390/block/dasd.c
parentbe7962856d299a0f231ac36f89f4a89cbecfe0ff (diff)
[S390] dasd: Add sysfs attribute status and generate uevents.
This patch adds a sysfs-attribute 'status' to make the DASD device-status accessible from user-space. In addition, the DASD driver generates an uevent(CHANGE) for the ccw-device on each device-status change. This enables user-space applications (e.g. udev) to do related processing. Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/block/dasd.c')
-rw-r--r--drivers/s390/block/dasd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
index eb5dc62f0d9..e71929db8b0 100644
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -398,6 +398,9 @@ dasd_change_state(struct dasd_device *device)
if (device->state == device->target)
wake_up(&dasd_init_waitq);
+
+ /* let user-space know that the device status changed */
+ kobject_uevent(&device->cdev->dev.kobj, KOBJ_CHANGE);
}
/*