bc: convert to "G trick" - this returns bc to zero bss increase
[oweals/busybox.git] / util-linux / blkdiscard.c
index 85039c5d084cd84b1a0dad4b0a3df6b5e576b17c..e4902e5b5ba12973a7ac3c5122b6b6741dab5e2a 100644 (file)
@@ -6,13 +6,15 @@
  * Licensed under GPLv2 or later, see file LICENSE in this source tree.
  */
 //config:config BLKDISCARD
-//config:      bool "blkdiscard"
+//config:      bool "blkdiscard (5.3 kb)"
 //config:      default y
+//config:      select PLATFORM_LINUX
 //config:      help
-//config:        blkdiscard discards sectors on a given device.
+//config:      blkdiscard discards sectors on a given device.
+
+//applet:IF_BLKDISCARD(APPLET_NOEXEC(blkdiscard, blkdiscard, BB_DIR_USR_BIN, BB_SUID_DROP, blkdiscard))
 
 //kbuild:lib-$(CONFIG_BLKDISCARD) += blkdiscard.o
-//applet:IF_BLKDISCARD(APPLET(blkdiscard, BB_DIR_USR_BIN, BB_SUID_DROP))
 
 //usage:#define blkdiscard_trivial_usage
 //usage:       "[-o OFS] [-l LEN] [-s] DEVICE"
@@ -44,7 +46,6 @@ int blkdiscard_main(int argc UNUSED_PARAM, char **argv)
        uint64_t offset; /* Leaving these two variables out does not  */
        uint64_t length; /* shrink code size and hampers readability. */
        uint64_t range[2];
-//     struct stat st;
        int fd;
 
        enum {
@@ -53,8 +54,7 @@ int blkdiscard_main(int argc UNUSED_PARAM, char **argv)
                OPT_SECURE = (1 << 2),
        };
 
-       opt_complementary = "=1";
-       opts = getopt32(argv, "o:l:s", &offset_str, &length_str);
+       opts = getopt32(argv, "^" "o:l:s" "\0" "=1", &offset_str, &length_str);
        argv += optind;
 
        fd = xopen(argv[0], O_RDWR|O_EXCL);