summaryrefslogtreecommitdiff
path: root/extras/multipath/main.c
diff options
context:
space:
mode:
authorchristophe.varoqui@free.fr <christophe.varoqui@free.fr>2004-02-06 00:14:51 -0800
committerGreg KH <gregkh@suse.de>2005-04-26 21:32:25 -0700
commitaca29aa51f0c8dfb1e6b8d60471d4034b65effb5 (patch)
tree8532de209602cbfeb0bdd18c0e9bc4acebe487f9 /extras/multipath/main.c
parent1dadabd79b28a4cd72382abf746e9cf4c0589617 (diff)
[PATCH] update extras/multipath
incremental to udev-016/extras/multipath, * don't rely on the linux symlink in the udev/klibc dir since udev build doesn't use it anymore. This corrects build breakage * remove make_dm_node fn & call. Rely on udev for this. The first patch is to be applied. The second is conditioned by udev dealing correctly with devmap names. For this I can suggest a CALLOUT rule like this : KERNEL=3D"dm-[0-9]*", PROGRAM=3D"/tmp/name_devmap %M %m", NAME=3D"%k", SY= MLINK=3D"%c" With name_devmap like : #!/bin/sh /usr/sbin/dmsetup ls|/bin/grep "$1, $2"|/usr/bin/awk '{print $1}'
Diffstat (limited to 'extras/multipath/main.c')
-rw-r--r--extras/multipath/main.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/extras/multipath/main.c b/extras/multipath/main.c
index e18e049128..d4dd89a305 100644
--- a/extras/multipath/main.c
+++ b/extras/multipath/main.c
@@ -559,46 +559,6 @@ coalesce_paths(struct env * conf, struct multipath * mp,
}
static int
-make_dm_node(char * str)
-{
- int r = 0;
- char buff[FILE_NAME_SIZE];
- struct dm_names * names;
- unsigned next = 0;
- struct dm_task *dmt;
-
- if (!(dmt = dm_task_create(DM_DEVICE_LIST)))
- return 0;
-
- if (!dm_task_run(dmt))
- goto out;
-
- if (!(names = dm_task_get_names(dmt)))
- goto out;
-
- if (!names->dev) {
- r = 1;
- goto out;
- }
-
- do {
- if (0 == strcmp(names->name, str))
- break;
- next = names->next;
- names = (void *) names + next;
- } while (next);
-
- sprintf(buff, "/dev/mapper/%s", str);
- unlink(buff);
- mknod(buff, 0600 | S_IFBLK, names->dev);
-
- out:
- dm_task_destroy(dmt);
- return r;
-
-}
-
-static int
dm_simplecmd(int task, const char *name) {
int r = 0;
struct dm_task *dmt;
@@ -711,7 +671,6 @@ setup_map(struct env * conf, struct path * all_paths,
if (op == DM_DEVICE_RELOAD)
dm_simplecmd(DM_DEVICE_RESUME, mp[index].wwid);
- make_dm_node(mp[index].wwid);
return 1;
}