diff --git a/libdm/libdevmapper.h b/libdm/libdevmapper.h index 82b685521..023863fad 100644 --- a/libdm/libdevmapper.h +++ b/libdm/libdevmapper.h @@ -53,6 +53,7 @@ struct dm_info { int exists; int suspended; unsigned int open_count; + int major; int minor; /* minor device number */ unsigned int target_count; }; diff --git a/libdm/libdm.c b/libdm/libdm.c index ebd92707b..5af896268 100644 --- a/libdm/libdm.c +++ b/libdm/libdm.c @@ -115,6 +115,7 @@ int dm_task_get_info(struct dm_task *dmt, struct dm_info *info) info->exists = dmt->dmi->exists; info->suspended = dmt->dmi->suspend; info->open_count = dmt->dmi->open_count; + info->major = dmt->dmi->major; info->minor = dmt->dmi->minor; info->target_count = dmt->dmi->target_count; return 1; @@ -367,7 +368,7 @@ int dm_task_run(struct dm_task *dmt) switch (dmt->type) { case DM_DEVICE_CREATE: - _add_dev_node(dmt->dev_name, MKDEV(DM_BLK_MAJOR, dmi->minor)); + _add_dev_node(dmt->dev_name, MKDEV(dmi->major, dmi->minor)); break; case DM_DEVICE_REMOVE: