1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

o Use MKDEV to build the dev_t for mknod

This commit is contained in:
Joe Thornber 2001-11-21 15:14:35 +00:00
parent d04ef4c26d
commit b39c635675

View File

@ -18,6 +18,7 @@
#include <errno.h>
#include <linux/dm-ioctl.h>
#include <linux/kdev_t.h>
#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: