hexedit: optimize output buffering
[oweals/busybox.git] / miscutils / flashcp.c
index 6cbf455ffdc82307b9d5da7c425c901c1776be61..858cee19451dcbb25c444eb94b0b799e55f3a6b5 100644 (file)
@@ -7,11 +7,16 @@
  * Licensed under GPLv2, see file LICENSE in this source tree.
  */
 //config:config FLASHCP
-//config:      bool "flashcp"
+//config:      bool "flashcp (5.4 kb)"
 //config:      default n  # doesn't build on Ubuntu 8.04
 //config:      help
-//config:        The flashcp binary, inspired by mtd-utils as of git head 5eceb74f7.
-//config:        This utility is used to copy images into a MTD device.
+//config:      The flashcp binary, inspired by mtd-utils as of git head 5eceb74f7.
+//config:      This utility is used to copy images into a MTD device.
+
+//applet:IF_FLASHCP(APPLET(flashcp, BB_DIR_USR_SBIN, BB_SUID_DROP))
+/* not NOEXEC: if flash operation stalls, use less memory in "hung" process */
+
+//kbuild:lib-$(CONFIG_FLASHCP) += flashcp.o
 
 //usage:#define flashcp_trivial_usage
 //usage:       "-v FILE MTD_DEVICE"
@@ -64,8 +69,7 @@ int flashcp_main(int argc UNUSED_PARAM, char **argv)
        RESERVE_CONFIG_UBUFFER(buf, BUFSIZE);
        RESERVE_CONFIG_UBUFFER(buf2, BUFSIZE);
 
-       opt_complementary = "=2"; /* exactly 2 non-option args: file, dev */
-       /*opts =*/ getopt32(argv, "v");
+       /*opts =*/ getopt32(argv, "^" "v" "\0" "=2"/*exactly 2 non-option args: file,dev*/);
        argv += optind;
 //     filename = *argv++;
 //     devicename = *argv;