diff options
author | Eric Andersen <andersen@codepoet.org> | 2003-03-07 18:03:02 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2003-03-07 18:03:02 +0000 |
commit | 3719e9e7908ae002ef579b2ce39273f9d7130d40 (patch) | |
tree | 5b0f6b902d9221efb6764a9f784b5819f57989a2 /util-linux | |
parent | 1bc5fa8c0cade0a70c106b2770e9042239fd618f (diff) | |
download | busybox-w32-3719e9e7908ae002ef579b2ce39273f9d7130d40.tar.gz busybox-w32-3719e9e7908ae002ef579b2ce39273f9d7130d40.tar.bz2 busybox-w32-3719e9e7908ae002ef579b2ce39273f9d7130d40.zip |
Scrub things a bit, shave off a few bytes.
-Erik
Diffstat (limited to 'util-linux')
-rw-r--r-- | util-linux/fdflush.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/util-linux/fdflush.c b/util-linux/fdflush.c index 7f5b6c9be..a4245c7e3 100644 --- a/util-linux/fdflush.c +++ b/util-linux/fdflush.c | |||
@@ -2,7 +2,8 @@ | |||
2 | /* | 2 | /* |
3 | * Mini fdflush implementation for busybox | 3 | * Mini fdflush implementation for busybox |
4 | * | 4 | * |
5 | * Copyright (C) 1995, 1996 by Bruce Perens <bruce@pixar.com>. | 5 | * Copyright (C) 1995, 1996 by Bruce Perens <bruce@perens.com>. |
6 | * Copyright (C) 2003 by Erik Andersen <andersen@codeoet.org> | ||
6 | * | 7 | * |
7 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
@@ -33,14 +34,16 @@ extern int fdflush_main(int argc, char **argv) | |||
33 | { | 34 | { |
34 | int fd; | 35 | int fd; |
35 | 36 | ||
36 | if (argc <= 1 || **(++argv) == '-') | 37 | if (argc <= 1) |
37 | show_usage(); | 38 | show_usage(); |
38 | 39 | if ((fd = open(*(++argv), 0)) < 0) | |
39 | if ((fd = open(*argv, 0)) < 0) | 40 | goto die_the_death; |
40 | perror_msg_and_die("%s", *argv); | ||
41 | 41 | ||
42 | if (ioctl(fd, FDFLUSH, 0)) | 42 | if (ioctl(fd, FDFLUSH, 0)) |
43 | perror_msg_and_die("%s", *argv); | 43 | goto die_the_death; |
44 | 44 | ||
45 | return EXIT_SUCCESS; | 45 | return EXIT_SUCCESS; |
46 | |||
47 | die_the_death: | ||
48 | perror_msg_and_die(NULL); | ||
46 | } | 49 | } |