From b39c63567562d0c1e4fccf8dbac6e2b9009af605 Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Wed, 21 Nov 2001 15:14:35 +0000 Subject: [PATCH] o Use MKDEV to build the dev_t for mknod --- libdm/libdm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libdm/libdm.c b/libdm/libdm.c index fd6bccd39..9cc22bdeb 100644 --- a/libdm/libdm.c +++ b/libdm/libdm.c @@ -18,6 +18,7 @@ #include #include +#include #define DEVICE_MAPPER_CONTROL "/dev/device-mapper/control" #define ALIGNMENT sizeof(int) @@ -245,8 +246,6 @@ static struct dm_ioctl *_flatten(struct dm_task *dmt) if (!(b = _add_target(t, b, e))) goto bad; - fprintf(stderr, "dm_ioctl size = %lu\n", dmi->data_size); - return dmi; bad: @@ -399,7 +398,7 @@ int dm_task_run(struct dm_task *dmt) switch (dmt->type) { case DM_DEVICE_CREATE: - _add_dev_node(dmt->dev_name, dmi->minor); + _add_dev_node(dmt->dev_name, MKDEV(DM_BLK_MAJOR, dmi->minor)); break; case DM_DEVICE_REMOVE: