[BusyBox-cvs] busybox/coreutils install.c,1.7,1.8

Glenn McGrath bug1 at busybox.net
Fri Jan 23 21:57:18 UTC 2004


Update of /var/cvs/busybox/coreutils
In directory nail:/tmp/cvs-serv26843/coreutils

Modified Files:
	install.c 
Log Message:
Enable long options, adds 150 bytes.


Index: install.c
===================================================================
RCS file: /var/cvs/busybox/coreutils/install.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- install.c	23 Jan 2004 21:40:19 -0000	1.7
+++ install.c	23 Jan 2004 21:57:16 -0000	1.8
@@ -39,6 +39,16 @@
 #define INSTALL_OPT_MODE  32
 #define INSTALL_OPT_OWNER  64
 
+static const struct option install_long_options[] = {
+	{ "directory",	0,	NULL,	'd' },
+	{ "preserve-timestamps",	0,	NULL,	'p' },
+	{ "strip",	0,	NULL,	's' },
+	{ "group",	0,	NULL,	'g' },
+	{ "mode", 	0,	NULL,	'm' },
+	{ "owner",	0,	NULL,	'o' },
+	{ 0,	0,	0,	0 }
+};
+	
 extern int install_main(int argc, char **argv)
 {
 	struct stat statbuf;
@@ -53,8 +63,9 @@
 	int flags;
 	int i;
 
-	/* -c exists for backwards compatability, its needed */
+	bb_applet_long_options = install_long_options;
 	bb_opt_complementaly = "s~d:d~s";
+	/* -c exists for backwards compatability, its needed */
 	flags = bb_getopt_ulflags(argc, argv, "cdpsg:m:o:", &gid_str, &mode_str, &uid_str);	/* 'a' must be 2nd */
 
 	/* Check valid options were given */




More information about the busybox-cvs mailing list