Displaying 1 result from an estimated 1 matches for "ctl_dev".
Did you mean:
ctrl_dev
2006 Aug 21
1
[PATCH 3 of 6] dm-userspace internal libdmu support for userspace tool
...return 0;
+}
+
+/*
+ * Create the character device node for our control channel
+ */
+static int make_device_node(unsigned major, unsigned minor)
+{
+ char path[256];
+
+ sprintf(path, "/dev/dmu%i", minor);
+
+ return mknod(path, S_IFCHR, makedev(major, minor));
+}
+
+static char *dmu_get_ctl_device(char *dm_device)
+{
+ unsigned ctl_major, ctl_minor;
+ static char path[256];
+
+ if (get_dm_control_dev(dm_device, &ctl_major, &ctl_minor) < 0)
+ return NULL;
+
+ if (ctl_major == 0) {
+ DPRINTF("Unable to get device number\n");
+ return NULL;
+ }
+
+ sprintf(path, "...