diff options
author | Mike Anderson <andmike@linux.vnet.ibm.com> | 2007-10-19 17:48:00 -0400 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2007-10-19 21:01:24 -0400 |
commit | 51e5b2bd34ded40ef48cade8a6a8f1baa0b4275e (patch) | |
tree | 7c1650dcd2f53bed2c0b8c9538e8da2d2d1286c2 /drivers/md/dm.c | |
parent | 96a1f7dba6e464155c0d1dc69c6c2efa96b644ac (diff) |
dm: add uevent to core
This patch adds a uevent skeleton to device-mapper.
Signed-off-by: Mike Anderson <andmike@linux.vnet.ibm.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r-- | drivers/md/dm.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 41c9549b32ad..bb5c1eaca52b 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c | |||
@@ -7,6 +7,7 @@ | |||
7 | 7 | ||
8 | #include "dm.h" | 8 | #include "dm.h" |
9 | #include "dm-bio-list.h" | 9 | #include "dm-bio-list.h" |
10 | #include "dm-uevent.h" | ||
10 | 11 | ||
11 | #include <linux/init.h> | 12 | #include <linux/init.h> |
12 | #include <linux/module.h> | 13 | #include <linux/module.h> |
@@ -143,11 +144,19 @@ static int __init local_init(void) | |||
143 | return -ENOMEM; | 144 | return -ENOMEM; |
144 | } | 145 | } |
145 | 146 | ||
147 | r = dm_uevent_init(); | ||
148 | if (r) { | ||
149 | kmem_cache_destroy(_tio_cache); | ||
150 | kmem_cache_destroy(_io_cache); | ||
151 | return r; | ||
152 | } | ||
153 | |||
146 | _major = major; | 154 | _major = major; |
147 | r = register_blkdev(_major, _name); | 155 | r = register_blkdev(_major, _name); |
148 | if (r < 0) { | 156 | if (r < 0) { |
149 | kmem_cache_destroy(_tio_cache); | 157 | kmem_cache_destroy(_tio_cache); |
150 | kmem_cache_destroy(_io_cache); | 158 | kmem_cache_destroy(_io_cache); |
159 | dm_uevent_exit(); | ||
151 | return r; | 160 | return r; |
152 | } | 161 | } |
153 | 162 | ||
@@ -162,6 +171,7 @@ static void local_exit(void) | |||
162 | kmem_cache_destroy(_tio_cache); | 171 | kmem_cache_destroy(_tio_cache); |
163 | kmem_cache_destroy(_io_cache); | 172 | kmem_cache_destroy(_io_cache); |
164 | unregister_blkdev(_major, _name); | 173 | unregister_blkdev(_major, _name); |
174 | dm_uevent_exit(); | ||
165 | 175 | ||
166 | _major = 0; | 176 | _major = 0; |
167 | 177 | ||