Remove dm_udev_XXX wrapper functions
authorHannes Reinecke <hare@suse.de>
Wed, 20 Aug 2014 12:56:09 +0000 (14:56 +0200)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Sun, 29 Mar 2015 16:14:41 +0000 (18:14 +0200)
As the definitions are encapsulated with the correct definitions
anyway there is no need to have private wrappers here.

Signed-off-by: Hannes Reinecke <hare@suse.de>
libmultipath/devmapper.c
libmultipath/devmapper.h
multipath/main.c
multipathd/main.c

index f0b0da1..1712c56 100644 (file)
@@ -42,23 +42,14 @@ static inline int dm_task_set_cookie(struct dm_task *dmt, uint32_t *c, int a)
        return 1;
 }
 
-void udev_wait(unsigned int c)
+void dm_udev_wait(unsigned int c)
 {
 }
 
-void udev_set_sync_support(int c)
+void dm_udev_set_sync_support(int c)
 {
 }
-#else
-void udev_wait(unsigned int c)
-{
-       dm_udev_wait(c);
-}
 
-void udev_set_sync_support(int c)
-{
-       dm_udev_set_sync_support(c);
-}
 #endif
 
 static void
@@ -245,7 +236,7 @@ dm_simplecmd (int task, const char *name, int no_flush, int need_sync, uint16_t
                if (!r)
                        dm_udev_complete(cookie);
                else
-                       udev_wait(cookie);
+                       dm_udev_wait(cookie);
        }
        out:
        dm_task_destroy (dmt);
@@ -325,7 +316,7 @@ dm_addmap (int task, const char *target, struct multipath *mpp, char * params,
                if (!r)
                        dm_udev_complete(cookie);
                else
-                       udev_wait(cookie);
+                       dm_udev_wait(cookie);
        }
        freeout:
        if (prefixed_uuid)
@@ -1354,7 +1345,7 @@ dm_rename (char * old, char * new)
        if (!r)
                dm_udev_complete(cookie);
        else
-               udev_wait(cookie);
+               dm_udev_wait(cookie);
 
 out:
        dm_task_destroy(dmt);
index 8188f48..2613503 100644 (file)
@@ -49,8 +49,6 @@ int dm_rename (char * old, char * new);
 int dm_reassign(const char * mapname);
 int dm_reassign_table(const char *name, char *old, char *new);
 int dm_setgeometry(struct multipath *mpp);
-void udev_wait(unsigned int c);
-void udev_set_sync_support(int c);
 
 #define VERSION_GE(v, minv) ( \
  (v[0] > minv[0]) || \
index bee9a65..f62dcb1 100644 (file)
@@ -582,7 +582,7 @@ main (int argc, char *argv[])
        if (dm_prereq())
                exit(1);
        dm_drv_version(conf->version, TGT_MPATH);
-       udev_set_sync_support(1);
+       dm_udev_set_sync_support(1);
 
        if (optind < argc) {
                conf->dev = MALLOC(FILE_NAME_SIZE);
index b86e3b6..fd3514f 100644 (file)
@@ -1817,7 +1817,7 @@ child (void * param)
        set_oom_adj();
 
        conf->daemon = 1;
-       udev_set_sync_support(0);
+       dm_udev_set_sync_support(0);
 #ifdef USE_SYSTEMD
        envp = getenv("WATCHDOG_USEC");
        if (envp && sscanf(envp, "%lu", &checkint) == 1) {