summaryrefslogtreecommitdiffstats
path: root/sys-utils/flock.c
diff options
context:
space:
mode:
authorKarel Zak2009-03-11 13:02:45 +0100
committerKarel Zak2009-03-11 13:37:45 +0100
commit56d23414c15634369394d8b42df1e96f7a171d1c (patch)
tree2e61ec947ba565eb96fad6d2585f65c8d788c309 /sys-utils/flock.c
parentflockc: segfaults when file name is not given (diff)
downloadkernel-qcow2-util-linux-56d23414c15634369394d8b42df1e96f7a171d1c.tar.gz
kernel-qcow2-util-linux-56d23414c15634369394d8b42df1e96f7a171d1c.tar.xz
kernel-qcow2-util-linux-56d23414c15634369394d8b42df1e96f7a171d1c.zip
flock: fix printf format error in usage()
flock.c: In function ‘usage’: flock.c:75: warning: too few arguments for format Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/flock.c')
-rw-r--r--sys-utils/flock.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys-utils/flock.c b/sys-utils/flock.c
index 3386e15b4..62bdf1adf 100644
--- a/sys-utils/flock.c
+++ b/sys-utils/flock.c
@@ -58,11 +58,11 @@ const char *program;
static void usage(int ex)
{
+ fputs("flock (" PACKAGE_STRING ")\n", stderr);
fprintf(stderr,
- "flock (%s)\n"
- "Usage: %s [-sxun][-w #] fd#\n"
- " %s [-sxon][-w #] file [-c] command...\n"
- " %s [-sxon][-w #] directory [-c] command...\n"
+ "Usage: %1$s [-sxun][-w #] fd#\n"
+ " %1$s [-sxon][-w #] file [-c] command...\n"
+ " %1$s [-sxon][-w #] directory [-c] command...\n"
" -s --shared Get a shared lock\n"
" -x --exclusive Get an exclusive lock\n"
" -u --unlock Remove a lock\n"
@@ -72,7 +72,7 @@ static void usage(int ex)
" -c --command Run a single command string through the shell\n"
" -h --help Display this text\n"
" -V --version Display version\n",
- PACKAGE_STRING, program, program);
+ program);
exit(ex);
}