diff options
author | Jim Meyering <meyering@redhat.com> | 2009-11-07 16:47:37 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2009-11-07 16:53:00 +0100 |
commit | 19d59bd32571cbd9c95486a216dc680799ce864a (patch) | |
tree | 67d3d135d4a4821aa419dda809c8a1f14d8c2ba0 /parted/ui.c | |
parent | 92bf03342267b32a645a7f911e9df40fea660f9b (diff) | |
download | parted-19d59bd32571cbd9c95486a216dc680799ce864a.tar.gz |
maint: use EXIT_SUCCESS and EXIT_FAILURE, not 0 and 1 to exit
Convert all uses automatically, via these two commands:
git grep -l '\<exit *(1)'|xargs --no-run-if-empty \
perl -pi -e 's/\b(exit ?)\(1\)/$1(EXIT_FAILURE)/'
git grep -l '\<exit *(0)'|xargs --no-run-if-empty \
perl -pi -e 's/\b(exit ?)\(0\)/$1(EXIT_SUCCESS)/'
* libparted/fs/fat/table.c (fat_table_get): Use symbolic exit codes.
* libparted/labels/vtoc.c (vtoc_update_format5_label_add): Likewise.
(vtoc_update_format5_label_del): Likewise.
(vtoc_update_format7_label_add): Likewise.
(vtoc_update_format7_label_del): Likewise.
* m4/parted.m4 (PARTED_CHECK_LIBPARTED): Likewise.
* parted/parted.c (do_quit): Likewise.
* parted/strlist.c (gettext_to_wchar, wchar_to_str): Likewise.
* parted/ui.c (reset_env, help_msg, non_interactive_mode): Likewise.
Diffstat (limited to 'parted/ui.c')
-rw-r--r-- | parted/ui.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/parted/ui.c b/parted/ui.c index c63df8a..58fb80c 100644 --- a/parted/ui.c +++ b/parted/ui.c @@ -314,7 +314,7 @@ reset_env (int quit) if (in_readline) { putchar ('\n'); if (quit) - exit (0); + exit (EXIT_SUCCESS); siglongjmp (readline_state.jmp_state, 1); } @@ -1471,7 +1471,7 @@ help_msg () fputs (_("COMMANDs:"), stdout); putchar ('\n'); print_commands_help (); - exit (0); + exit (EXIT_SUCCESS); } void @@ -1553,7 +1553,7 @@ non_interactive_mode (PedDevice** dev, Command* cmd_list[], if (!(cmd->non_interactive)) { fputs(_("This command does not make sense in " "non-interactive mode.\n"), stdout); - exit(1); + exit(EXIT_FAILURE); goto error; } |