mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
o Use MKDEV to build the dev_t for mknod
This commit is contained in:
parent
d04ef4c26d
commit
b39c635675
@ -18,6 +18,7 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include <linux/dm-ioctl.h>
|
#include <linux/dm-ioctl.h>
|
||||||
|
#include <linux/kdev_t.h>
|
||||||
|
|
||||||
#define DEVICE_MAPPER_CONTROL "/dev/device-mapper/control"
|
#define DEVICE_MAPPER_CONTROL "/dev/device-mapper/control"
|
||||||
#define ALIGNMENT sizeof(int)
|
#define ALIGNMENT sizeof(int)
|
||||||
@ -245,8 +246,6 @@ static struct dm_ioctl *_flatten(struct dm_task *dmt)
|
|||||||
if (!(b = _add_target(t, b, e)))
|
if (!(b = _add_target(t, b, e)))
|
||||||
goto bad;
|
goto bad;
|
||||||
|
|
||||||
fprintf(stderr, "dm_ioctl size = %lu\n", dmi->data_size);
|
|
||||||
|
|
||||||
return dmi;
|
return dmi;
|
||||||
|
|
||||||
bad:
|
bad:
|
||||||
@ -399,7 +398,7 @@ int dm_task_run(struct dm_task *dmt)
|
|||||||
|
|
||||||
switch (dmt->type) {
|
switch (dmt->type) {
|
||||||
case DM_DEVICE_CREATE:
|
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;
|
break;
|
||||||
|
|
||||||
case DM_DEVICE_REMOVE:
|
case DM_DEVICE_REMOVE:
|
||||||
|
Loading…
Reference in New Issue
Block a user