[libmultipath] rename conf->default_hwhandler to conf->hwhandler
authorChristophe Varoqui <root@xa-s05.(none)>
Wed, 18 Jan 2006 16:30:17 +0000 (17:30 +0100)
committerChristophe Varoqui <root@xa-s05.(none)>
Wed, 18 Jan 2006 16:30:17 +0000 (17:30 +0100)
Misleading name. The real default is DEFAULT_HWHANDLER.

libmultipath/config.c
libmultipath/config.h
libmultipath/dict.c
libmultipath/propsel.c
libmultipath/structs.c

index 75c776c..fc6f055 100644 (file)
@@ -293,8 +293,8 @@ free_config (struct config * conf)
        if (conf->features)
                FREE(conf->features);
 
-       if (conf->default_hwhandler)
-               FREE(conf->default_hwhandler);
+       if (conf->hwhandler)
+               FREE(conf->hwhandler);
 
        free_blacklist(conf->blist_devnode);
        free_blacklist(conf->blist_wwid);
@@ -386,12 +386,12 @@ load_config (char * file)
        if (conf->features == NULL)
                conf->features = set_default(DEFAULT_FEATURES);
 
-       if (conf->default_hwhandler == NULL)
-               conf->default_hwhandler = set_default(DEFAULT_HWHANDLER);
+       if (conf->hwhandler == NULL)
+               conf->hwhandler = set_default(DEFAULT_HWHANDLER);
 
        if (!conf->selector  || !conf->udev_dir         ||
            !conf->getuid    || !conf->features ||
-           !conf->default_hwhandler)
+           !conf->hwhandler)
                goto out;
 
        if (!conf->checker_index)
index 47dc03d..59a4f67 100644 (file)
@@ -62,7 +62,7 @@ struct config {
        char * getuid;
        char * getprio;
        char * features;
-       char * default_hwhandler;
+       char * hwhandler;
        char * bindings_file;
 
        vector mptable;
index 94fc0b9..1df47ae 100644 (file)
@@ -951,8 +951,8 @@ snprint_hw_hardware_handler (char * buff, int len, void * data)
 
        if (!hwe->hwhandler)
                return 0;
-       if (strlen(hwe->hwhandler) == strlen(conf->default_hwhandler) &&
-           !strcmp(hwe->hwhandler, conf->default_hwhandler))
+       if (strlen(hwe->hwhandler) == strlen(conf->hwhandler) &&
+           !strcmp(hwe->hwhandler, conf->hwhandler))
                return 0;
 
        return snprintf(buff, len, "%s", hwe->hwhandler);
index 62fd393..cc864cc 100644 (file)
@@ -182,7 +182,7 @@ select_hwhandler (struct multipath * mp)
                condlog(3, "hwhandler = %s (controler setting)", mp->hwhandler);
                return 0;
        }
-       mp->hwhandler = conf->default_hwhandler;
+       mp->hwhandler = conf->hwhandler;
        condlog(3, "hwhandler = %s (internal default)", mp->hwhandler);
        return 0;
 }
index b047158..d0a6425 100644 (file)
@@ -141,7 +141,7 @@ free_multipath_attributes (struct multipath * mpp)
        }
 
        if (mpp->hwhandler &&
-           mpp->hwhandler != conf->default_hwhandler &&
+           mpp->hwhandler != conf->hwhandler &&
            (!mpp->hwe || (mpp->hwe && mpp->hwhandler != mpp->hwe->hwhandler))) {
                FREE(mpp->hwhandler);
                mpp->hwhandler = NULL;