aboutsummaryrefslogtreecommitdiff
path: root/toys/pending
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2014-12-31 21:30:59 -0600
committerRob Landley <rob@landley.net>2014-12-31 21:30:59 -0600
commitf3e56f4e4ff773de95fa2c9daf979734d826fc33 (patch)
tree8a8e75b3530b504569ebe4fae09020073534c6db /toys/pending
parent5834ddd6df659d9c9dc7333284fc86762dea061a (diff)
downloadtoybox-f3e56f4e4ff773de95fa2c9daf979734d826fc33.tar.gz
Redo option parsing infrastructure so #define FORCE_FLAGS can unzero flag macros for a disabled command (needed when multiple commands share infrastructure with a common set of flags).
This means the flag space is no longer packed, but leaves gaps where the zeroes go. (Actual flag bit positions are the same for all configs.) Since the option parsing needs to know where the holes are, the OPTSTR values are now generated as part of flags.h with ascii 1 values for the disabled values. (So generated/oldflags.h went away.) This also means that the option string argument for OLDTOY() went away, it now uses the same arguments as the NEWTOY() it references.
Diffstat (limited to 'toys/pending')
-rw-r--r--toys/pending/ftpget.c2
-rw-r--r--toys/pending/groupadd.c2
-rw-r--r--toys/pending/groupdel.c2
-rw-r--r--toys/pending/ip.c10
-rw-r--r--toys/pending/pgrep.c2
-rw-r--r--toys/pending/sh.c2
-rw-r--r--toys/pending/tcpsvd.c2
-rw-r--r--toys/pending/traceroute.c2
-rw-r--r--toys/pending/useradd.c2
-rw-r--r--toys/pending/userdel.c2
10 files changed, 14 insertions, 14 deletions
diff --git a/toys/pending/ftpget.c b/toys/pending/ftpget.c
index 2a81a34a..a1447139 100644
--- a/toys/pending/ftpget.c
+++ b/toys/pending/ftpget.c
@@ -6,7 +6,7 @@
* No Standard.
*
USE_FTPGET(NEWTOY(ftpget, "<2cvu:p:P#<0=21>65535", TOYFLAG_BIN))
-USE_FTPGET(OLDTOY(ftpput,ftpget, "<2vu:p:P#<0=21>65535", TOYFLAG_BIN))
+USE_FTPGET(OLDTOY(ftpput, ftpget, TOYFLAG_BIN))
config FTPGET
bool "ftpget/ftpput"
diff --git a/toys/pending/groupadd.c b/toys/pending/groupadd.c
index 7df0a5c3..615c12f8 100644
--- a/toys/pending/groupadd.c
+++ b/toys/pending/groupadd.c
@@ -6,7 +6,7 @@
* See http://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/groupadd.html
USE_GROUPADD(NEWTOY(groupadd, "<1>2g#<0S", TOYFLAG_NEEDROOT|TOYFLAG_SBIN))
-USE_GROUPADD(OLDTOY(addgroup, groupadd, OPTSTR_groupadd, TOYFLAG_NEEDROOT|TOYFLAG_SBIN))
+USE_GROUPADD(OLDTOY(addgroup, groupadd, TOYFLAG_NEEDROOT|TOYFLAG_SBIN))
config GROUPADD
bool "groupadd"
diff --git a/toys/pending/groupdel.c b/toys/pending/groupdel.c
index 834e113e..483ac59c 100644
--- a/toys/pending/groupdel.c
+++ b/toys/pending/groupdel.c
@@ -6,7 +6,7 @@
* See http://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/groupdel.html
USE_GROUPDEL(NEWTOY(groupdel, "<1>2", TOYFLAG_NEEDROOT|TOYFLAG_SBIN))
-USE_GROUPDEL(OLDTOY(delgroup, groupdel, OPTSTR_groupdel, TOYFLAG_NEEDROOT|TOYFLAG_SBIN))
+USE_GROUPDEL(OLDTOY(delgroup, groupdel, TOYFLAG_NEEDROOT|TOYFLAG_SBIN))
config GROUPDEL
bool "groupdel"
diff --git a/toys/pending/ip.c b/toys/pending/ip.c
index 42d3a734..be4d8bba 100644
--- a/toys/pending/ip.c
+++ b/toys/pending/ip.c
@@ -8,11 +8,11 @@
* No Standard.
*
USE_IP(NEWTOY(ip, NULL, TOYFLAG_SBIN))
-USE_IP(OLDTOY(ipaddr, ip, NULL, TOYFLAG_SBIN))
-USE_IP(OLDTOY(iplink, ip, NULL, TOYFLAG_SBIN))
-USE_IP(OLDTOY(iproute, ip, NULL, TOYFLAG_SBIN))
-USE_IP(OLDTOY(iprule, ip, NULL, TOYFLAG_SBIN))
-USE_IP(OLDTOY(iptunnel, ip, NULL, TOYFLAG_SBIN))
+USE_IP(OLDTOY(ipaddr, ip, TOYFLAG_SBIN))
+USE_IP(OLDTOY(iplink, ip, TOYFLAG_SBIN))
+USE_IP(OLDTOY(iproute, ip, TOYFLAG_SBIN))
+USE_IP(OLDTOY(iprule, ip, TOYFLAG_SBIN))
+USE_IP(OLDTOY(iptunnel, ip, TOYFLAG_SBIN))
config IP
bool "ip"
diff --git a/toys/pending/pgrep.c b/toys/pending/pgrep.c
index 77b6cede..59767b9f 100644
--- a/toys/pending/pgrep.c
+++ b/toys/pending/pgrep.c
@@ -5,7 +5,7 @@
*
USE_PGREP(NEWTOY(pgrep, "?P# s# xvonlf[!sP]", TOYFLAG_USR|TOYFLAG_BIN))
-USE_PGREP(OLDTOY(pkill, pgrep, OPTSTR_pgrep, TOYFLAG_USR|TOYFLAG_BIN))
+USE_PGREP(OLDTOY(pkill, pgrep, TOYFLAG_USR|TOYFLAG_BIN))
config PGREP
bool "pgrep"
diff --git a/toys/pending/sh.c b/toys/pending/sh.c
index 81f91a7b..a234e5b9 100644
--- a/toys/pending/sh.c
+++ b/toys/pending/sh.c
@@ -25,7 +25,7 @@ USE_SH(NEWTOY(cd, NULL, TOYFLAG_NOFORK))
USE_SH(NEWTOY(exit, NULL, TOYFLAG_NOFORK))
USE_SH(NEWTOY(sh, "c:"USE_SH_INTERACTIVE("i"), TOYFLAG_BIN))
-USE_SH(OLDTOY(toysh, sh, OPTSTR_sh, TOYFLAG_BIN))
+USE_SH(OLDTOY(toysh, sh, TOYFLAG_BIN))
config SH
bool "sh (toysh)"
diff --git a/toys/pending/tcpsvd.c b/toys/pending/tcpsvd.c
index d7e1f6c1..585ae733 100644
--- a/toys/pending/tcpsvd.c
+++ b/toys/pending/tcpsvd.c
@@ -7,7 +7,7 @@
* No Standard.
USE_TCPSVD(NEWTOY(tcpsvd, "^<3c#=30<1C:b#=20<0u:l:hEv", TOYFLAG_USR|TOYFLAG_BIN))
-USE_TCPSVD(OLDTOY(udpsvd, tcpsvd, OPTSTR_tcpsvd, TOYFLAG_USR|TOYFLAG_BIN))
+USE_TCPSVD(OLDTOY(udpsvd, tcpsvd, TOYFLAG_USR|TOYFLAG_BIN))
config TCPSVD
bool "tcpsvd"
diff --git a/toys/pending/traceroute.c b/toys/pending/traceroute.c
index 92509930..830331a5 100644
--- a/toys/pending/traceroute.c
+++ b/toys/pending/traceroute.c
@@ -8,7 +8,7 @@
* No Standard
USE_TRACEROUTE(NEWTOY(traceroute, "<1>2i:f#<1>255=1z#<0>86400=0g*w#<0>86400=5t#<0>255=0s:q#<1>255=3p#<1>65535=33434m#<1>255=30rvndlIUF64", TOYFLAG_STAYROOT|TOYFLAG_USR|TOYFLAG_BIN))
-USE_TRACEROUTE(OLDTOY(traceroute6,traceroute, OPTSTR_traceroute, TOYFLAG_STAYROOT|TOYFLAG_USR|TOYFLAG_BIN))
+USE_TRACEROUTE(OLDTOY(traceroute6,traceroute, TOYFLAG_STAYROOT|TOYFLAG_USR|TOYFLAG_BIN))
config TRACEROUTE
bool "traceroute"
default n
diff --git a/toys/pending/useradd.c b/toys/pending/useradd.c
index 4f2bcc61..78f083b7 100644
--- a/toys/pending/useradd.c
+++ b/toys/pending/useradd.c
@@ -6,7 +6,7 @@
* See http://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/useradd.html
USE_USERADD(NEWTOY(useradd, "<1>2u#<0G:s:g:h:SDH", TOYFLAG_NEEDROOT|TOYFLAG_UMASK|TOYFLAG_SBIN))
-USE_USERADD(OLDTOY(adduser, useradd, OPTSTR_useradd, TOYFLAG_NEEDROOT|TOYFLAG_UMASK|TOYFLAG_SBIN))
+USE_USERADD(OLDTOY(adduser, useradd, TOYFLAG_NEEDROOT|TOYFLAG_UMASK|TOYFLAG_SBIN))
config USERADD
bool "useradd"
diff --git a/toys/pending/userdel.c b/toys/pending/userdel.c
index 8619a620..9c93a219 100644
--- a/toys/pending/userdel.c
+++ b/toys/pending/userdel.c
@@ -5,7 +5,7 @@
* See http://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/userdel.html
USE_USERDEL(NEWTOY(userdel, "<1>1r", TOYFLAG_NEEDROOT|TOYFLAG_SBIN))
-USE_USERDEL(OLDTOY(deluser, userdel, OPTSTR_userdel, TOYFLAG_NEEDROOT|TOYFLAG_SBIN))
+USE_USERDEL(OLDTOY(deluser, userdel, TOYFLAG_NEEDROOT|TOYFLAG_SBIN))
config USERDEL
bool "userdel"