diff options
author | Florian Weimer <fweimer@redhat.com> | 2020-11-26 16:59:44 +0100 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2020-11-26 18:26:52 +0100 |
commit | db07fae8250401adb2b97ab3e53d41da2a6bd767 (patch) | |
tree | 3a9db118b13f39de8a39e652f61674cbf38ab143 /elf/ldconfig.c | |
parent | 603ae243f6fe03208a3bb92adecf72403367bd95 (diff) | |
download | glibc-db07fae8250401adb2b97ab3e53d41da2a6bd767.tar.gz glibc-db07fae8250401adb2b97ab3e53d41da2a6bd767.tar.xz glibc-db07fae8250401adb2b97ab3e53d41da2a6bd767.zip |
elf: Introduce enum opt_format in the ldconfig implementation
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'elf/ldconfig.c')
-rw-r--r-- | elf/ldconfig.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/elf/ldconfig.c b/elf/ldconfig.c index 3768267bac..006198fe59 100644 --- a/elf/ldconfig.c +++ b/elf/ldconfig.c @@ -100,8 +100,7 @@ static int opt_print_cache; int opt_verbose; /* Format to support. */ -/* 0: only libc5/glibc2; 1: both; 2: only glibc 2.2. */ -int opt_format = 2; +enum opt_format opt_format = opt_format_new; /* Build cache. */ static int opt_build_cache = 1; @@ -281,11 +280,11 @@ parse_opt (int key, char *arg, struct argp_state *state) break; case 'c': if (strcmp (arg, "old") == 0) - opt_format = 0; + opt_format = opt_format_old; else if (strcmp (arg, "compat") == 0) - opt_format = 1; + opt_format = opt_format_compat; else if (strcmp (arg, "new") == 0) - opt_format = 2; + opt_format = opt_format_new; break; default: return ARGP_ERR_UNKNOWN; |