X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=extras%2Fmultipath%2Fmain.c;h=d4dd89a3056b4529b22713cb1ad91784f5436ba4;hb=aca29aa51f0c8dfb1e6b8d60471d4034b65effb5;hp=e18e049128d7aba1b72ea958f7a612c15a39d979;hpb=1dadabd79b28a4cd72382abf746e9cf4c0589617;p=elogind.git diff --git a/extras/multipath/main.c b/extras/multipath/main.c index e18e04912..d4dd89a30 100644 --- a/extras/multipath/main.c +++ b/extras/multipath/main.c @@ -558,46 +558,6 @@ coalesce_paths(struct env * conf, struct multipath * mp, return nmp; } -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; @@ -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; }