summaryrefslogtreecommitdiff
path: root/block/genhd.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/genhd.c')
-rw-r--r--block/genhd.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/block/genhd.c b/block/genhd.c
index ceb08af72c1a..e1b2f898d790 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -1092,8 +1092,17 @@ static void disk_release(struct device *dev)
blk_put_queue(disk->queue);
iput(disk->part0->bd_inode); /* frees the disk */
}
+
+static int block_uevent(struct device *dev, struct kobj_uevent_env *env)
+{
+ struct gendisk *disk = dev_to_disk(dev);
+
+ return add_uevent_var(env, "DISKSEQ=%llu", disk->diskseq);
+}
+
struct class block_class = {
.name = "block",
+ .dev_uevent = block_uevent,
};
static char *block_devnode(struct device *dev, umode_t *mode,