]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Fix error handling in a few programs.
authorUlrich Drepper <drepper@redhat.com>
Mon, 2 Feb 2009 00:18:18 +0000 (16:18 -0800)
committerUlrich Drepper <drepper@redhat.com>
Mon, 2 Feb 2009 00:18:18 +0000 (16:18 -0800)
src/ChangeLog
src/Makefile.am
src/elflint.c
src/objdump.c
src/readelf.c

index 4886bcf2c48a05f0a3a386dcaaa88bced56ebba7..3e960021bdfa0a3674f3c567f34437d0fd3575a1 100644 (file)
@@ -1,3 +1,13 @@
+2009-02-01  Ulrich Drepper  <drepper@redhat.com>
+
+       * ar.c (main): Fix recognition of invalid modes for a, b, i modifiers.
+       Improve some error messages.
+       Use program_invocation_short_name instead of AR macro.
+       * Makefile.am (CFLAGS_ar): Remove.
+       * elflint.c (parse_opt): ARGP_HELP_EXIT_ERR does nothing for argp_help.
+       * objdump.c (parse_opt): Likewise.
+       * readelf.c (parse_opt): Likewise.
+
 2009-01-24  Ulrich Drepper  <drepper@redhat.com>
 
        * readelf.c (print_debug_frame_section): Fix computation of vma_base
index c92accbe1f1c821640eae6b94d77247aa3724569..64e4478bef7e901452652722cc62f444f164c8ae 100644 (file)
@@ -130,7 +130,6 @@ objdump_LDADD  = $(libasm) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
 ranlib_LDADD = libar.a $(libelf) $(libeu) $(libmudflap)
 strings_LDADD = $(libelf) $(libeu) $(libmudflap)
 ar_LDADD = libar.a $(libelf) $(libeu) $(libmudflap)
-CFLAGS_ar = -DAR=\"$(shell echo ar|sed '$(transform)')\"
 unstrip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(libmudflap) -ldl
 
 ldlex.o: ldscript.c
index 826d94c3dbfd0d3ea05b1001bf150c43bcb1833b..7ddf3a9a3c5321880c0e07e4d7b493d8f3779d1e 100644 (file)
@@ -220,9 +220,8 @@ parse_opt (int key, char *arg __attribute__ ((unused)),
 
     case ARGP_KEY_NO_ARGS:
       fputs (gettext ("Missing file name.\n"), stderr);
-      argp_help (&argp, stderr, ARGP_HELP_SEE | ARGP_HELP_EXIT_ERR,
-                program_invocation_short_name);
-      exit (1);
+      argp_help (&argp, stderr, ARGP_HELP_SEE, program_invocation_short_name);
+      exit (EXIT_FAILURE);
 
     default:
       return ARGP_ERR_UNKNOWN;
index 7f6394100ce037792633941016079f953ce3bfcd..1a62a0222af9e2ef5c5800e7ead1bcb26623e07b 100644 (file)
@@ -234,9 +234,9 @@ parse_opt (int key, char *arg,
       if (! any_control_option)
        {
          fputs (gettext ("No operation specified.\n"), stderr);
-         argp_help (&argp, stderr, ARGP_HELP_SEE | ARGP_HELP_EXIT_ERR,
+         argp_help (&argp, stderr, ARGP_HELP_SEE,
                     program_invocation_short_name);
-         exit (1);
+         exit (EXIT_FAILURE);
        }
 
     default:
index 55c906f7de5806a396dfadaf52eabfa0dfd4d336..bc0e4fd038edb9c7390fe61490111093a32b47a5 100644 (file)
@@ -412,9 +412,9 @@ parse_opt (int key, char *arg,
        {
          fputs (gettext ("No operation specified.\n"), stderr);
        do_argp_help:
-         argp_help (&argp, stderr, ARGP_HELP_SEE | ARGP_HELP_EXIT_ERR,
+         argp_help (&argp, stderr, ARGP_HELP_SEE,
                     program_invocation_short_name);
-         exit (1);
+         exit (EXIT_FAILURE);
        }
       break;
     default: