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

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

index 7c463c0..d6a1cf8 100644 (file)
@@ -394,8 +394,8 @@ load_config (char * file)
            !conf->default_hwhandler)
                goto out;
 
-       if (!conf->default_checker_index)
-               conf->default_checker_index = READSECTOR0;
+       if (!conf->checker_index)
+               conf->checker_index = READSECTOR0;
 
        return 0;
 out:
index 05f9203..53abf66 100644 (file)
@@ -45,7 +45,7 @@ struct config {
        int pgpolicy_flag;
        int with_sysfs;
        int pgpolicy;
-       int default_checker_index;
+       int checker_index;
        int dev_type;
        int minio;
        int checkint;
index 73ad95f..ff34ebb 100644 (file)
@@ -119,7 +119,7 @@ def_path_checker_handler(vector strvec)
        if (!buff)
                return 1;
        
-       conf->default_checker_index = get_checker_id(buff);
+       conf->checker_index = get_checker_id(buff);
        FREE(buff);
 
        return 0;
@@ -1072,7 +1072,7 @@ snprint_hw_path_checker (char * buff, int len, void * data)
 
        if (!hwe->checker_index)
                return 0;
-       if (hwe->checker_index == conf->default_checker_index)
+       if (hwe->checker_index == conf->checker_index)
                return 0;
        get_checker_name(str, CHECKER_NAME_SIZE, hwe->checker_index);
        
@@ -1169,11 +1169,11 @@ snprint_def_path_checker (char * buff, int len, void * data)
 {
        char str[CHECKER_NAME_SIZE];
 
-       if (!conf->default_checker_index)
+       if (!conf->checker_index)
                return 0;
-       if (conf->default_checker_index == DEFAULT_CHECKER_ID)
+       if (conf->checker_index == DEFAULT_CHECKER_ID)
                return 0;
-       get_checker_name(str, CHECKER_NAME_SIZE, conf->default_checker_index);
+       get_checker_name(str, CHECKER_NAME_SIZE, conf->checker_index);
        
        return snprintf(buff, len, "%s", str);
 }
index 15109af..69932e4 100644 (file)
@@ -200,10 +200,10 @@ select_checkfn(struct path *pp)
                pp->checkfn = get_checker_addr(pp->hwe->checker_index);
                return 0;
        }
-       if (conf->default_checker_index > 0) {
-               pp->checkfn = get_checker_addr(conf->default_checker_index);
+       if (conf->checker_index > 0) {
+               pp->checkfn = get_checker_addr(conf->checker_index);
                get_checker_name(checker_name, CHECKER_NAME_SIZE,
-                                conf->default_checker_index);
+                                conf->checker_index);
                condlog(3, "path checker = %s (config file default)",
                        checker_name);
                return 0;