diff options
author | Karel Zak | 2012-02-13 11:16:57 +0100 |
---|---|---|
committer | Karel Zak | 2012-03-27 13:11:55 +0200 |
commit | e2036b6fa8a0fb0467ed3295cf06d25ede3542eb (patch) | |
tree | 690def85e327beeee3d43438f5bc80a27612114e /misc-utils/eject.c | |
parent | build-sys: add eject to .gitignore (diff) | |
download | kernel-qcow2-util-linux-e2036b6fa8a0fb0467ed3295cf06d25ede3542eb.tar.gz kernel-qcow2-util-linux-e2036b6fa8a0fb0467ed3295cf06d25ede3542eb.tar.xz kernel-qcow2-util-linux-e2036b6fa8a0fb0467ed3295cf06d25ede3542eb.zip |
eject: fix compiler warnings [-Wformat]
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'misc-utils/eject.c')
-rw-r--r-- | misc-utils/eject.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/misc-utils/eject.c b/misc-utils/eject.c index 9ef744436..c2a67f882 100644 --- a/misc-utils/eject.c +++ b/misc-utils/eject.c @@ -251,7 +251,7 @@ static void parse_args(int argc, char **argv, char **device) } /* check for a single additional argument */ if ((argc - optind) > 1) { - errx(1, _("%s: too many arguments")); + errx(1, _("too many arguments")); } if ((argc - optind) == 1) { /* one argument */ *device = xstrdup(argv[optind]); @@ -699,9 +699,12 @@ void handle_x_option(char *deviceName) { if (v_option) { if (x_arg == 0) - printf(_("%s: setting CD-ROM speed to auto\n"), program_invocation_short_name); + printf(_("%s: setting CD-ROM speed to auto\n"), + program_invocation_short_name); else - printf(_("%s: setting CD-ROM speed to %dX\n"), program_invocation_short_name, x_arg); + printf(_("%s: setting CD-ROM speed to %ldX\n"), + program_invocation_short_name, + x_arg); } fd = open_device(deviceName); select_speed(fd, x_arg); @@ -853,7 +856,7 @@ int main(int argc, char **argv) { /* handle -c option */ if (c_option) { if (v_option) - printf(_("%s: selecting CD-ROM disc #%d\n"), programName, c_arg); + printf(_("%s: selecting CD-ROM disc #%ld\n"), programName, c_arg); fd = open_device(deviceName); changer_select(fd, c_arg); handle_x_option(deviceName); @@ -918,7 +921,7 @@ int main(int argc, char **argv) { } if (!worked) { - err(1, _("unable to eject, last error"), programName, strerror(errno)); + err(1, _("unable to eject, last error")); } /* cleanup */ |