aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2003-03-07 18:03:02 +0000
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2003-03-07 18:03:02 +0000
commitd527011bf73874285bb632e0594e2045c4e23f9a (patch)
tree5b0f6b902d9221efb6764a9f784b5819f57989a2
parent3bf6d3c64c77e62273ad91ba98317da43e1210b4 (diff)
downloadbusybox-w32-d527011bf73874285bb632e0594e2045c4e23f9a.tar.gz
busybox-w32-d527011bf73874285bb632e0594e2045c4e23f9a.tar.bz2
busybox-w32-d527011bf73874285bb632e0594e2045c4e23f9a.zip
Scrub things a bit, shave off a few bytes.
-Erik git-svn-id: svn://busybox.net/trunk/busybox@6717 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r--util-linux/fdflush.c15
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
47die_the_death:
48 perror_msg_and_die(NULL);
46} 49}