rpms/device-mapper/devel device-mapper-mknod.patch,1.1,1.2
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Thu Dec 1 21:52:56 UTC 2005
Author: pjones
Update of /cvs/dist/rpms/device-mapper/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv7837
Modified Files:
device-mapper-mknod.patch
Log Message:
- change the patch so it doesn't do update_devs() for all the commands
- add an explicit api call for update_devs
device-mapper-mknod.patch:
.exported_symbols | 1 +
ioctl/libdm-iface.c | 10 ++++++++--
libdevmapper.h | 6 ++++++
3 files changed, 15 insertions(+), 2 deletions(-)
Index: device-mapper-mknod.patch
===================================================================
RCS file: /cvs/dist/rpms/device-mapper/devel/device-mapper-mknod.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- device-mapper-mknod.patch 16 Nov 2005 21:42:07 -0000 1.1
+++ device-mapper-mknod.patch 1 Dec 2005 21:52:54 -0000 1.2
@@ -1,49 +1,51 @@
---- device-mapper.1.01.05/lib/ioctl/libdm-iface.c.mknod 2005-11-16 16:35:41.000000000 -0500
-+++ device-mapper.1.01.05/lib/ioctl/libdm-iface.c 2005-11-16 16:36:41.000000000 -0500
-@@ -1352,8 +1352,11 @@
- command = _cmd_data_v4[dmt->type].cmd;
-
- /* Old-style creation had a table supplied */
-- if (dmt->type == DM_DEVICE_CREATE && dmt->head)
-- return _create_and_load_v4(dmt);
-+ if (dmt->type == DM_DEVICE_CREATE && dmt->head) {
-+ int ret = _create_and_load_v4(dmt);
-+ update_devs();
-+ return ret;
-+ }
-
- if (dmt->type == DM_DEVICE_MKNODES && !dmt->dev_name &&
- !dmt->uuid && dmt->major <= 0)
-@@ -1386,27 +1389,32 @@
- case DM_DEVICE_CREATE:
- add_dev_node(dmt->dev_name, MAJOR(dmi->dev), MINOR(dmi->dev),
- dmt->uid, dmt->gid, dmt->mode);
-+ update_devs();
- break;
-
- case DM_DEVICE_REMOVE:
- /* FIXME Kernel needs to fill in dmi->name */
- if (dmt->dev_name)
- rm_dev_node(dmt->dev_name);
-+ update_devs();
- break;
-
- case DM_DEVICE_RENAME:
- /* FIXME Kernel needs to fill in dmi->name */
- if (dmt->dev_name)
- rename_dev_node(dmt->dev_name, dmt->newname);
-+ update_devs();
- break;
-
- case DM_DEVICE_MKNODES:
-+ update_devs();
- if (dmi->flags & DM_EXISTS_FLAG)
- add_dev_node(dmi->name, MAJOR(dmi->dev),
- MINOR(dmi->dev),
- dmt->uid, dmt->gid, dmt->mode);
- else if (dmt->dev_name)
- rm_dev_node(dmt->dev_name);
-+ update_devs();
- break;
-
- case DM_DEVICE_STATUS:
+--- device-mapper.1.01.05/lib/.exported_symbols.mknod 2005-12-01 16:43:02.000000000 -0500
++++ device-mapper.1.01.05/lib/.exported_symbols 2005-12-01 16:43:40.000000000 -0500
+@@ -21,6 +21,7 @@
+ dm_task_set_message
+ dm_task_add_target
+ dm_task_no_open_count
++dm_task_make_nodes
+ dm_get_next_target
+ dm_task_run
+ dm_set_dev_dir
+--- device-mapper.1.01.05/lib/ioctl/libdm-iface.c.mknod 2005-09-20 14:04:28.000000000 -0400
++++ device-mapper.1.01.05/lib/ioctl/libdm-iface.c 2005-12-01 16:48:25.000000000 -0500
+@@ -622,8 +622,9 @@
+ #ifdef DM_IOCTLS
+ else if (ioctl(_control_fd, command, dmi) < 0) {
+ if (_log_suppress)
+- log_verbose("device-mapper ioctl cmd %d failed: %s",
+- _IOC_NR(command), strerror(errno));
++ log_verbose("device-mapper: %s failed: %s",
++ _cmd_data_v1[dmt->type].name,
++ strerror(errno));
+ else
+ log_error("device-mapper ioctl cmd %d failed: %s",
+ _IOC_NR(command), strerror(errno));
+@@ -1332,6 +1333,11 @@
+ return dmi;
+ }
+
++void dm_task_make_nodes(void)
++{
++ update_devs();
++}
++
+ int dm_task_run(struct dm_task *dmt)
+ {
+ struct dm_ioctl *dmi;
+--- device-mapper.1.01.05/lib/libdevmapper.h.mknod 2005-12-01 16:49:05.000000000 -0500
++++ device-mapper.1.01.05/lib/libdevmapper.h 2005-12-01 16:50:29.000000000 -0500
+@@ -159,6 +159,12 @@
+ int dm_task_run(struct dm_task *dmt);
+
+ /*
++ * Call this to make the device nodes associated with previously issued
++ * commands.
++ */
++void dm_task_make_nodes(void);
++
++/*
+ * Configure the device-mapper directory
+ */
+ int dm_set_dev_dir(const char *dir);
More information about the fedora-cvs-commits
mailing list