X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=miscutils%2Fflashcp.c;h=858cee19451dcbb25c444eb94b0b799e55f3a6b5;hb=d72e804e6db1bd6eb2417961004b4fe33aba9384;hp=6cbf455ffdc82307b9d5da7c425c901c1776be61;hpb=fb4da167114e96d7f20ef97474f976f8ffa604e7;p=oweals%2Fbusybox.git diff --git a/miscutils/flashcp.c b/miscutils/flashcp.c index 6cbf455ff..858cee194 100644 --- a/miscutils/flashcp.c +++ b/miscutils/flashcp.c @@ -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;