summaryrefslogtreecommitdiff
path: root/elf/ldconfig.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2020-11-26 16:59:44 +0100
committerFlorian Weimer <fweimer@redhat.com>2020-11-26 18:26:52 +0100
commitdb07fae8250401adb2b97ab3e53d41da2a6bd767 (patch)
tree3a9db118b13f39de8a39e652f61674cbf38ab143 /elf/ldconfig.c
parent603ae243f6fe03208a3bb92adecf72403367bd95 (diff)
downloadglibc-db07fae8250401adb2b97ab3e53d41da2a6bd767.tar.gz
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.c9
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;