X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=e2fsck%2Fflushb.c;h=c20755021301bd132ac8309fc78b330463b7397d;hb=204ae371ad2e038b41c03aba13d3a57e4e6921ec;hp=16389b2dabc3420ca9579e173200639b858af770;hpb=5ba23cb149f2ff629446fb8cb5f1012c05f7a4f4;p=tools%2Fe2fsprogs.git diff --git a/e2fsck/flushb.c b/e2fsck/flushb.c index 16389b2..c207550 100644 --- a/e2fsck/flushb.c +++ b/e2fsck/flushb.c @@ -3,24 +3,14 @@ * * Copyright 1997, 2000, by Theodore Ts'o. * - * This program may be used under the provisions of the GNU Public - * License, *EXCEPT* that a binary copy of the executable may not be - * packaged as a part of binary package which is distributed as part - * of a Linux distribution. (Yes, this violates the Debian Free - * Software Guidelines of restricting its field of use. That's the - * point. I don't want this program being distributed in Debian, - * because I don't care to support it, and the maintainer, Yann - * Dirson, doesn't seem to pay attention to my wishes on this matter. - * So I'm deliberately adding this clause so it violates the Debian - * Free Software Guidelines to force him to take it out. (What part - * of THIS IS FOR MY OWN USE don't you understand? And no, I'm going - * to write a man page for it either. And don't file a bug about it - * or bug me about it.) If this doesn't work, I'll have to remove it - * from the upstream source distribution at the next release. End of - * Rant. :-) - * - * (BTW, use of flushb on some older 2.2 kernels on a heavily loaded - * system will corrupt filesystems.) + * WARNING: use of flushb on some older 2.2 kernels on a heavily loaded + * system will corrupt filesystems. This program is not really useful + * beyond for benchmarking scripts. + * + * %Begin-Header% + * This file may be redistributed under the terms of the GNU Public + * License. + * %End-Header% */ #include @@ -29,11 +19,12 @@ #include #include #include +#include #include "../misc/nls-enable.h" -/* For Linux/i386, define BLKFLSBUF */ -#if (!defined(BLKFLSBUF) && defined(__i386__)) -#define BLKFLSBUF 0x1261 /* flush buffer cache */ +/* For Linux, define BLKFLSBUF if necessary */ +#if (!defined(BLKFLSBUF) && defined(__linux__)) +#define BLKFLSBUF _IO(0x12,97) /* flush buffer cache */ #endif const char *progname;