aboutsummaryrefslogtreecommitdiff
path: root/toys
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2019-01-25 07:33:48 -0600
committerRob Landley <rob@landley.net>2019-01-25 07:33:48 -0600
commitb8070a742549e418e5e96e69cfd88f7e8d41880e (patch)
tree9a070d2b4f07d890a0d86285929b314f328a37ac /toys
parent49bfa0723dc411a6063822b5e84b2209804bb573 (diff)
downloadtoybox-b8070a742549e418e5e96e69cfd88f7e8d41880e.tar.gz
OpenEmbedded needs commands installed in specific places.
Diffstat (limited to 'toys')
-rw-r--r--toys/net/microcom.c2
-rw-r--r--toys/other/blockdev.c2
-rw-r--r--toys/other/chrt.c2
-rw-r--r--toys/other/hwclock.c12
-rw-r--r--toys/other/modinfo.c2
-rw-r--r--toys/other/pmap.c2
-rw-r--r--toys/other/printenv.c2
-rw-r--r--toys/other/taskset.c2
-rw-r--r--toys/other/timeout.c2
-rw-r--r--toys/other/truncate.c2
-rw-r--r--toys/posix/nice.c2
-rw-r--r--toys/posix/nl.c2
-rw-r--r--toys/posix/paste.c2
-rw-r--r--toys/posix/ps.c2
-rw-r--r--toys/posix/sed.c2
15 files changed, 20 insertions, 20 deletions
diff --git a/toys/net/microcom.c b/toys/net/microcom.c
index 26ff2589..6f88ad4f 100644
--- a/toys/net/microcom.c
+++ b/toys/net/microcom.c
@@ -2,7 +2,7 @@
*
* Copyright 2017 The Android Open Source Project.
-USE_MICROCOM(NEWTOY(microcom, "<1>1s:X", TOYFLAG_BIN))
+USE_MICROCOM(NEWTOY(microcom, "<1>1s:X", TOYFLAG_USR|TOYFLAG_BIN))
config MICROCOM
bool "microcom"
diff --git a/toys/other/blockdev.c b/toys/other/blockdev.c
index a9bc3e78..9f169453 100644
--- a/toys/other/blockdev.c
+++ b/toys/other/blockdev.c
@@ -4,7 +4,7 @@
*
* No Standard.
-USE_BLOCKDEV(NEWTOY(blockdev, "<1>1(setro)(setrw)(getro)(getss)(getbsz)(setbsz)#<0(getsz)(getsize)(getsize64)(getra)(setra)#<0(flushbufs)(rereadpt)",TOYFLAG_USR|TOYFLAG_BIN))
+USE_BLOCKDEV(NEWTOY(blockdev, "<1>1(setro)(setrw)(getro)(getss)(getbsz)(setbsz)#<0(getsz)(getsize)(getsize64)(getra)(setra)#<0(flushbufs)(rereadpt)",TOYFLAG_SBIN))
config BLOCKDEV
bool "blockdev"
diff --git a/toys/other/chrt.c b/toys/other/chrt.c
index 618de84d..6732a711 100644
--- a/toys/other/chrt.c
+++ b/toys/other/chrt.c
@@ -4,7 +4,7 @@
*
* Note: -ibrfo flags sorted to match SCHED positions for highest_bit()
-USE_CHRT(NEWTOY(chrt, "^mp#<0iRbrfo[!ibrfo]", TOYFLAG_USR|TOYFLAG_SBIN))
+USE_CHRT(NEWTOY(chrt, "^mp#<0iRbrfo[!ibrfo]", TOYFLAG_USR|TOYFLAG_BIN))
config CHRT
bool "chrt"
diff --git a/toys/other/hwclock.c b/toys/other/hwclock.c
index 81a29b77..94877f9e 100644
--- a/toys/other/hwclock.c
+++ b/toys/other/hwclock.c
@@ -4,7 +4,7 @@
*
* No standard, but see Documentation/rtc.txt in the linux kernel source..
*
-USE_HWCLOCK(NEWTOY(hwclock, ">0(fast)f(rtc):u(utc)l(localtime)t(systz)s(hctosys)r(show)w(systohc)[-ul][!rtsw]", TOYFLAG_USR|TOYFLAG_BIN))
+USE_HWCLOCK(NEWTOY(hwclock, ">0(fast)f(rtc):u(utc)l(localtime)t(systz)s(hctosys)r(show)w(systohc)[-ul][!rtsw]", TOYFLAG_SBIN))
config HWCLOCK
bool "hwclock"
@@ -26,7 +26,7 @@ config HWCLOCK
#include <linux/rtc.h>
GLOBALS(
- char *fname;
+ char *f;
int utc;
)
@@ -45,7 +45,7 @@ static int rtc_find(struct dirtree* node)
fclose(fp);
if (items == 1 && hctosys == 1) {
sprintf(toybuf, "/dev/%s", node->name);
- TT.fname = toybuf;
+ TT.f = toybuf;
return DIRTREE_ABORT;
}
@@ -78,11 +78,11 @@ void hwclock_main()
int w = toys.optflags & FLAG_w, flag = O_WRONLY*w;
// Open /dev/rtc (if your system has no /dev/rtc symlink, search for it).
- if (!TT.fname && (fd = open("/dev/rtc", flag)) == -1) {
+ if (!TT.f && (fd = open("/dev/rtc", flag)) == -1) {
dirtree_read("/sys/class/rtc", rtc_find);
- if (!TT.fname) TT.fname = "/dev/misc/rtc";
+ if (!TT.f) TT.f = "/dev/misc/rtc";
}
- if (fd == -1) fd = xopen(TT.fname, flag);
+ if (fd == -1) fd = xopen(TT.f, flag);
// Get current time in seconds from rtc device. todo: get subsecond time
if (!w) {
diff --git a/toys/other/modinfo.c b/toys/other/modinfo.c
index d631b3b3..126d1d63 100644
--- a/toys/other/modinfo.c
+++ b/toys/other/modinfo.c
@@ -4,7 +4,7 @@
*
* TODO: cleanup
-USE_MODINFO(NEWTOY(modinfo, "<1b:k:F:0", TOYFLAG_BIN))
+USE_MODINFO(NEWTOY(modinfo, "<1b:k:F:0", TOYFLAG_SBIN))
config MODINFO
bool "modinfo"
diff --git a/toys/other/pmap.c b/toys/other/pmap.c
index 9b29bacd..1641c95c 100644
--- a/toys/other/pmap.c
+++ b/toys/other/pmap.c
@@ -5,7 +5,7 @@
*
* No Standard.
-USE_PMAP(NEWTOY(pmap, "<1xq", TOYFLAG_BIN))
+USE_PMAP(NEWTOY(pmap, "<1xq", TOYFLAG_USR|TOYFLAG_BIN))
config PMAP
bool "pmap"
diff --git a/toys/other/printenv.c b/toys/other/printenv.c
index e8bcf29b..65f62edf 100644
--- a/toys/other/printenv.c
+++ b/toys/other/printenv.c
@@ -2,7 +2,7 @@
*
* Copyright 2012 Georgi Chorbadzhiyski <georgi@unixsol.org>
-USE_PRINTENV(NEWTOY(printenv, "0(null)", TOYFLAG_USR|TOYFLAG_BIN))
+USE_PRINTENV(NEWTOY(printenv, "0(null)", TOYFLAG_BIN))
config PRINTENV
bool "printenv"
diff --git a/toys/other/taskset.c b/toys/other/taskset.c
index 8ffdab78..89fd5283 100644
--- a/toys/other/taskset.c
+++ b/toys/other/taskset.c
@@ -2,7 +2,7 @@
*
* Copyright 2012 Elie De Brauwer <eliedebrauwer@gmail.com>
-USE_TASKSET(NEWTOY(taskset, "<1^pa", TOYFLAG_BIN|TOYFLAG_STAYROOT))
+USE_TASKSET(NEWTOY(taskset, "<1^pa", TOYFLAG_USR|TOYFLAG_BIN|TOYFLAG_STAYROOT))
USE_NPROC(NEWTOY(nproc, "(all)", TOYFLAG_USR|TOYFLAG_BIN))
config NPROC
diff --git a/toys/other/timeout.c b/toys/other/timeout.c
index 51e3a7e3..4c5bc48d 100644
--- a/toys/other/timeout.c
+++ b/toys/other/timeout.c
@@ -4,7 +4,7 @@
*
* No standard
-USE_TIMEOUT(NEWTOY(timeout, "<2^vk:s: ", TOYFLAG_BIN))
+USE_TIMEOUT(NEWTOY(timeout, "<2^vk:s: ", TOYFLAG_USR|TOYFLAG_BIN))
config TIMEOUT
bool "timeout"
diff --git a/toys/other/truncate.c b/toys/other/truncate.c
index 142d3c7a..40eb1e59 100644
--- a/toys/other/truncate.c
+++ b/toys/other/truncate.c
@@ -2,7 +2,7 @@
*
* Copyright 2011 Rob Landley <rob@landley.net>
-USE_TRUNCATE(NEWTOY(truncate, "<1s:|c", TOYFLAG_BIN))
+USE_TRUNCATE(NEWTOY(truncate, "<1s:|c", TOYFLAG_USR|TOYFLAG_BIN))
config TRUNCATE
bool "truncate"
diff --git a/toys/posix/nice.c b/toys/posix/nice.c
index 57feffe1..ca5e2224 100644
--- a/toys/posix/nice.c
+++ b/toys/posix/nice.c
@@ -4,7 +4,7 @@
*
* See http://opengroup.org/onlinepubs/9699919799/utilities/nice.html
-USE_NICE(NEWTOY(nice, "^<1n#", TOYFLAG_USR|TOYFLAG_BIN))
+USE_NICE(NEWTOY(nice, "^<1n#", TOYFLAG_BIN))
config NICE
bool "nice"
diff --git a/toys/posix/nl.c b/toys/posix/nl.c
index 3dbfcfd1..b9e60ae2 100644
--- a/toys/posix/nl.c
+++ b/toys/posix/nl.c
@@ -7,7 +7,7 @@
* This implements a subset: only one logical page (-ip), no sections (-dfh).
* todo: -lv
-USE_NL(NEWTOY(nl, "v#<1=1l#w#<0=6Eb:n:s:", TOYFLAG_BIN))
+USE_NL(NEWTOY(nl, "v#<1=1l#w#<0=6Eb:n:s:", TOYFLAG_USR|TOYFLAG_BIN))
config NL
bool "nl"
diff --git a/toys/posix/paste.c b/toys/posix/paste.c
index 872a744f..7d9ba947 100644
--- a/toys/posix/paste.c
+++ b/toys/posix/paste.c
@@ -6,7 +6,7 @@
*
* Deviations from posix: the FILE argument isn't mandatory, none == '-'
-USE_PASTE(NEWTOY(paste, "d:s", TOYFLAG_BIN|TOYFLAG_LOCALE))
+USE_PASTE(NEWTOY(paste, "d:s", TOYFLAG_USR|TOYFLAG_BIN|TOYFLAG_LOCALE))
config PASTE
bool "paste"
diff --git a/toys/posix/ps.c b/toys/posix/ps.c
index fef9c908..079bdbd6 100644
--- a/toys/posix/ps.c
+++ b/toys/posix/ps.c
@@ -44,7 +44,7 @@
* TODO: top: thread support and SMP
* TODO: pgrep -f only searches the amount of cmdline that fits in toybuf.
-USE_PS(NEWTOY(ps, "k(sort)*P(ppid)*aAdeflMno*O*p(pid)*s*t*Tu*U*g*G*wZ[!ol][+Ae][!oO]", TOYFLAG_USR|TOYFLAG_BIN|TOYFLAG_LOCALE))
+USE_PS(NEWTOY(ps, "k(sort)*P(ppid)*aAdeflMno*O*p(pid)*s*t*Tu*U*g*G*wZ[!ol][+Ae][!oO]", TOYFLAG_BIN|TOYFLAG_LOCALE))
// stayroot because iotop needs root to read other process' proc/$$/io
// TOP and IOTOP have a large common option block used for common processing,
// the default values are different but the flags are in the same order.
diff --git a/toys/posix/sed.c b/toys/posix/sed.c
index 175e05d6..e111467b 100644
--- a/toys/posix/sed.c
+++ b/toys/posix/sed.c
@@ -11,7 +11,7 @@
* What's the right thing to do for -i when write fails? Skip to next?
* test '//q' with no previous regex, also repeat previous regex?
-USE_SED(NEWTOY(sed, "(help)(version)e*f*i:;nErz(null-data)[+Er]", TOYFLAG_USR|TOYFLAG_BIN|TOYFLAG_LOCALE|TOYFLAG_NOHELP))
+USE_SED(NEWTOY(sed, "(help)(version)e*f*i:;nErz(null-data)[+Er]", TOYFLAG_BIN|TOYFLAG_LOCALE|TOYFLAG_NOHELP))
config SED
bool "sed"