OSDN Git Service

Regenerate generated files after upstream sync.
authorElliott Hughes <enh@google.com>
Wed, 11 Mar 2015 20:37:18 +0000 (13:37 -0700)
committerElliott Hughes <enh@google.com>
Wed, 11 Mar 2015 20:37:18 +0000 (13:37 -0700)
Change-Id: Idbfcc6f260f8b993a19a5ef4b54586b2af8026bb

.config
generated/config.h
generated/flags.h
generated/globals.h
generated/help.h
generated/newtoys.h

diff --git a/.config b/.config
index f3b1fd2..afd36b4 100644 (file)
--- a/.config
+++ b/.config
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # ToyBox version: KCONFIG_VERSION
-# Wed Feb 18 17:26:13 2015
+# Wed Mar 11 12:36:10 2015
 #
 CONFIG_TOYBOX_CONTAINER=y
 CONFIG_TOYBOX_FIFREEZE=y
@@ -152,7 +152,6 @@ CONFIG_PS=y
 CONFIG_ROUTE=y
 CONFIG_SETENFORCE=y
 # CONFIG_SH is not set
-# CONFIG_SH_INTERACTIVE is not set
 # CONFIG_EXIT is not set
 # CONFIG_CD is not set
 # CONFIG_SULOGIN is not set
index 38c7603..d4545c7 100644 (file)
 #define USE_SETENFORCE(...) __VA_ARGS__
 #define CFG_SH 0
 #define USE_SH(...)
-#define CFG_SH_INTERACTIVE 0
-#define USE_SH_INTERACTIVE(...)
 #define CFG_EXIT 0
 #define USE_EXIT(...)
 #define CFG_CD 0
index bf9527a..59a7623 100644 (file)
 #undef FLAG_m
 #endif
 
-// mknod <2>4 <2>4
+// mknod <2>4m(mode): <2>4m(mode):
 #undef OPTSTR_mknod
-#define OPTSTR_mknod "<2>4"
+#define OPTSTR_mknod "<2>4m(mode):"
 #ifdef CLEANUP_mknod
 #undef CLEANUP_mknod
 #undef FOR_mknod
+#undef FLAG_mode
+#undef FLAG_m
 #endif
 
 // mkpasswd   >2S:m:P#=0<0
 #undef FLAG_j
 #endif
 
-// oneit   ^<1c:p
+// oneit   ^<1nc:p3[!pn]
 #undef OPTSTR_oneit
 #define OPTSTR_oneit  0 
 #ifdef CLEANUP_oneit
 #undef CLEANUP_oneit
 #undef FOR_oneit
+#undef FLAG_3
 #undef FLAG_p
 #undef FLAG_c
+#undef FLAG_n
 #endif
 
 // openvt   c#<1>63sw
 #undef FLAG_n
 #endif
 
-// sed (version)e*f*inr (version)e*f*inr
+// sed (version)e*f*inEr[+Er] (version)e*f*inEr[+Er]
 #undef OPTSTR_sed
-#define OPTSTR_sed "(version)e*f*inr"
+#define OPTSTR_sed "(version)e*f*inEr[+Er]"
 #ifdef CLEANUP_sed
 #undef CLEANUP_sed
 #undef FOR_sed
 #undef FLAG_r
+#undef FLAG_E
 #undef FLAG_n
 #undef FLAG_i
 #undef FLAG_f
 #undef FLAG_p
 #endif
 
-// timeout <2^k:s:  <2^k:s: 
+// timeout <2^vk:s:  <2^vk:s: 
 #undef OPTSTR_timeout
-#define OPTSTR_timeout "<2^k:s: "
+#define OPTSTR_timeout "<2^vk:s: "
 #ifdef CLEANUP_timeout
 #undef CLEANUP_timeout
 #undef FOR_timeout
 #undef FLAG_s
 #undef FLAG_k
+#undef FLAG_v
 #endif
 
 // top >0d#=3n#<1mb >0d#=3n#<1mb
 #undef FOR_unlink
 #endif
 
-// unshare   <1^imnpuU
+// unshare   <1^rimnpuU
 #undef OPTSTR_unshare
 #define OPTSTR_unshare  0 
 #ifdef CLEANUP_unshare
 #undef FLAG_n
 #undef FLAG_m
 #undef FLAG_i
+#undef FLAG_r
 #endif
 
 // uptime    
 #ifndef TT
 #define TT this.mknod
 #endif
+#define FLAG_mode (1<<0)
+#define FLAG_m (1<<0)
 #endif
 
 #ifdef FOR_mkpasswd
 #ifndef TT
 #define TT this.oneit
 #endif
-#define FLAG_p (FORCED_FLAG<<0)
-#define FLAG_c (FORCED_FLAG<<1)
+#define FLAG_3 (FORCED_FLAG<<0)
+#define FLAG_p (FORCED_FLAG<<1)
+#define FLAG_c (FORCED_FLAG<<2)
+#define FLAG_n (FORCED_FLAG<<3)
 #endif
 
 #ifdef FOR_openvt
 #define TT this.sed
 #endif
 #define FLAG_r (1<<0)
-#define FLAG_n (1<<1)
-#define FLAG_i (1<<2)
-#define FLAG_f (1<<3)
-#define FLAG_e (1<<4)
-#define FLAG_version (1<<5)
+#define FLAG_E (1<<1)
+#define FLAG_n (1<<2)
+#define FLAG_i (1<<3)
+#define FLAG_f (1<<4)
+#define FLAG_e (1<<5)
+#define FLAG_version (1<<6)
 #endif
 
 #ifdef FOR_seq
 #endif
 #define FLAG_s (1<<0)
 #define FLAG_k (1<<1)
+#define FLAG_v (1<<2)
 #endif
 
 #ifdef FOR_top
 #define FLAG_n (FORCED_FLAG<<3)
 #define FLAG_m (FORCED_FLAG<<4)
 #define FLAG_i (FORCED_FLAG<<5)
+#define FLAG_r (FORCED_FLAG<<6)
 #endif
 
 #ifdef FOR_uptime
index 61ad617..7841675 100644 (file)
@@ -54,6 +54,12 @@ struct md5sum_data {
   } buffer;
 };
 
+// toys/lsb/mknod.c
+
+struct mknod_data {
+  char *m;
+};
+
 // toys/lsb/mktemp.c
 
 struct mktemp_data {
@@ -650,6 +656,8 @@ struct ping_data {
 struct ps_data {
   struct arg_list *llist_o;
   unsigned screen_width;
+
+  void *o;
 };
 
 // toys/pending/route.c
@@ -1153,6 +1161,7 @@ extern union global_union {
        struct dmesg_data dmesg;
        struct killall_data killall;
        struct md5sum_data md5sum;
+       struct mknod_data mknod;
        struct mktemp_data mktemp;
        struct mount_data mount;
        struct passwd_data passwd;
index b9bbfc6..51a9d98 100644 (file)
@@ -44,7 +44,7 @@
 
 #define help_mktemp "usage: mktemp [-dq] [-p DIR] [TEMPLATE]\n\nSafely create a new file \"DIR/TEMPLATE\" and print its name.\n\n-d    Create directory instead of file (--directory)\n-p      Put new file in DIR (--tmpdir)\n-q      Quiet, no error messages\n\nEach X in TEMPLATE is replaced with a random printable character. The\ndefault TEMPLATE is tmp.XXXXXX, and the default DIR is $TMPDIR if set,\nelse \"/tmp\".\n\n"
 
-#define help_mknod "usage: mknod NAME TYPE [MAJOR MINOR]\n\nCreate a special file NAME with a given type, possible types are\nb        block device\nc or u    character device\np     named pipe (ignores MAJOR/MINOR)\n\n"
+#define help_mknod "usage: mknod [-m MODE] NAME TYPE [MAJOR MINOR]\n\nCreate a special file NAME with a given type. TYPE is b for block device,\nc or u for character device, p for named pipe (which ignores MAJOR/MINOR).\n\n-m      Mode (file permissions) of new device, in octal or u+x format\n\n"
 
 #define help_sha1sum "usage: sha1sum [FILE]...\n\ncalculate sha1 hash for each input file, reading from stdin if none.\nOutput one hash (20 hex digits) for each input file, followed by\nfilename.\n\n-b      brief (hash only, no filename)\n\n"
 
@@ -72,7 +72,7 @@
 
 #define help_truncate "usage: truncate [-c] -s file...\n\nSet length of file(s), extending sparsely if necessary.\n\n-c        Don't create file if it doesn't exist.\n-s      New size\n\n"
 
-#define help_timeout "usage: timeout [-k LENGTH] [-s SIGNAL] LENGTH COMMAND...\n\nRun command line as a child process, sending child a signal if the\ncommand doesn't exit soon enough.\n\nLength can be a decimal fraction. An optional suffix can be \"m\"\n(minutes), \"h\" (hours), \"d\" (days), or \"s\" (seconds, the default).\n\n-s   Send specified signal (default TERM)\n-k        Send KILL signal if child still running this long after first signal.\n\n"
+#define help_timeout "usage: timeout [-k LENGTH] [-s SIGNAL] LENGTH COMMAND...\n\nRun command line as a child process, sending child a signal if the\ncommand doesn't exit soon enough.\n\nLength can be a decimal fraction. An optional suffix can be \"m\"\n(minutes), \"h\" (hours), \"d\" (days), or \"s\" (seconds, the default).\n\n-s   Send specified signal (default TERM)\n-k        Send KILL signal if child still running this long after first signal.\n-v       Verbose\n\n"
 
 #define help_taskset "usage: taskset [-ap] [mask] [PID | cmd [args...]]\n\nLaunch a new task which may only run on certain processors, or change\nthe processor affinity of an exisitng PID.\n\nMask is a hex string where each bit represents a processor the process\nis allowed to run on. PID without a mask displays existing affinity.\n\n-p     Set/get the affinity of given PID instead of a new command.\n-a Set/get the affinity of all threads of the PID.\n\n"
 
 
 #define help_partprobe "usage: partprobe DEVICE...\n\nTell the kernel about partition table changes\n\nAsk the kernel to re-read the partition table on the specified devices.\n\n"
 
-#define help_oneit "usage: oneit [-p] [-c /dev/tty0] command [...]\n\nA simple init program that runs a single supplied command line with a\ncontrolling tty (so CTRL-C can kill it).\n\n-p    Power off instead of rebooting when command exits.\n-c  Which console device to use.\n\nThe oneit command runs the supplied command line as a child process\n(because PID 1 has signals blocked), attached to /dev/tty0, in its\nown session. Then oneit reaps zombies until the child exits, at\nwhich point it reboots (or with -p, powers off) the system.\n\n"
+#define help_oneit "usage: oneit [-p] [-c /dev/tty0] command [...]\n\nSimple init program that runs a single supplied command line with a\ncontrolling tty (so CTRL-C can kill it).\n\n-c      Which console device to use (/dev/console doesn't do CTRL-C, etc).\n-p  Power off instead of rebooting when command exits.\n-r  Restart child when it exits.\n-3        Write 32 bit PID of each exiting reparented process to fd 3 of child.\n (Blocking writes, child must read to avoid eventual deadlock.)\n\nSpawns a single child process (because PID 1 has signals blocked)\nin its own session, reaps zombies until the child exits, then\nreboots the system (or powers off with -p, or restarts the child with -r).\n\n"
 
-#define help_nsenter "usage: nsenter [-t pid] [-F] [-i] [-m] [-n] [-p] [-u] [-U] COMMAND...\n\nRun COMMAND in a different set of namespaces.\n\n-t  PID to take namespaces from    (--target)\n-F  don't fork, even if -p is used (--no-fork)\n\nThe namespaces to switch are:\n\n-i   SysV IPC: message queues, semaphores, shared memory (--ipc)\n-m Mount/unmount tree (--mnt)\n-n  Network address, sockets, routing, iptables (--net)\n-p Process IDs and init, will fork unless -F is used (--pid)\n-u   Host and domain names (--uts)\n-U       UIDs, GIDs, capabilities (--user)\n\nIf -t isn't specified, each namespace argument must provide a path\nto a namespace file, ala \"-i=/proc/$PID/ns/ipc\"\n\n"
+#define help_nsenter "usage: nsenter [-t pid] [-F] [-i] [-m] [-n] [-p] [-u] [-U] COMMAND...\n\nRun COMMAND in an existing (set of) namespace(s).\n\n-t  PID to take namespaces from    (--target)\n-F  don't fork, even if -p is used (--no-fork)\n\nThe namespaces to switch are:\n\n-i       SysV IPC: message queues, semaphores, shared memory (--ipc)\n-m Mount/unmount tree (--mnt)\n-n  Network address, sockets, routing, iptables (--net)\n-p Process IDs and init, will fork unless -F is used (--pid)\n-u   Host and domain names (--uts)\n-U       UIDs, GIDs, capabilities (--user)\n\nIf -t isn't specified, each namespace argument must provide a path\nto a namespace file, ala \"-i=/proc/$PID/ns/ipc\"\n\n"
 
-#define help_unshare "usage: unshare [-imnpuU] COMMAND...\n\nCreate new namespace(s) for this process and its children, so some\nattribute is not shared with the parent process.  This is part of\nLinux Containers.  Each process can have its own:\n\n-i    SysV IPC (message queues, semaphores, shared memory)\n-m        Mount/unmount tree\n-n  Network address, sockets, routing, iptables\n-p Process IDs and init\n-u        Host and domain names\n-U       UIDs, GIDs, capabilities\n\n"
+#define help_unshare "usage: unshare [-imnpuUr] COMMAND...\n\nCreate new container namespace(s) for this process and its children, so\nsome attribute is not shared with the parent process.\n\n-i     SysV IPC (message queues, semaphores, shared memory)\n-m        Mount/unmount tree\n-n  Network address, sockets, routing, iptables\n-p Process IDs and init\n-r        Become root (map current euid/egid to 0/0, implies -U)\n-u      Host and domain names\n-U       UIDs, GIDs, capabilities\n\nA namespace allows a set of processes to have a different view of the\nsystem than other sets of processes.\n\n"
 
 #define help_netcat "usage: netcat [-tu] [-lL COMMAND...] [-wpq #] [-s addr] {IPADDR PORTNUM|-f FILENAME}\n\n-L        listen for multiple incoming connections (server mode).\n-f     use FILENAME (ala /dev/ttyS0) instead of network\n-l    listen for one incoming connection.\n-p local port number\n-q   SECONDS quit this many seconds after EOF on stdin.\n-s  local ipv4 address\n-t  allocate tty (must come before -l or -L)\n-w    SECONDS timeout for connection\n\nUse \"stty 115200 -F /dev/ttyS0 && stty raw -echo -ctlecho\" with\nnetcat -f to connect to a serial port.\n\nThe command line after -l or -L is executed to handle each incoming\nconnection. If none, the connection is forwarded to stdin/stdout.\n\nFor a quick-and-dirty server, try something like:\nnetcat -s 127.0.0.1 -p 1234 -tL /bin/bash -l\n"
 
 
 #define help_exit "usage: exit [status]\n\nExit shell.  If no return value supplied on command line, use value\nof most recent command, or 0 if none.\n\n"
 
-#define help_sh_interactive "This shell supports terminal control (so the shell isn't killed by CTRL-C),\njob control (fg, bg, jobs), and reads /etc/profile and ~/.profile when\nrunning interactively.\n\n-i interactive mode (default when STDIN is a tty)\n\n"
-
-#define help_sh "usage: sh [-c command] [script]\n\nCommand shell.  Runs a shell script, or reads input interactively\nand responds to it.\n\n-c       command line to execute\n\n"
+#define help_sh "usage: sh [-c command] [script]\n\nCommand shell.  Runs a shell script, or reads input interactively\nand responds to it.\n\n-c       command line to execute\n-i     interactive mode (default when STDIN is a tty)\n\n"
 
 #define help_setenforce "usage: setenforce [enforcing|permissive|1|0]\n\nSets whether SELinux is enforcing (1) or permissive (0).\n\n"
 
 
 #define help_reset "usage: reset\n\nA program to reset the terminal.\n\n"
 
-#define help_ps "usage: ps [-o COL1,COL2=HEADER] [-T]\n\nShow list of processes\n\n-o COL1,COL2=HEADER Select columns for display\n-T      Show threads\n\n"
+#define help_ps "usage: ps [-o COL1,COL2=HEADER] [-T]\n\nShow list of processes\n\n-a  Show all processes with a tty\n-A  Show all processes\n-o       Select columns for display\n-T  Show threads\n\n"
 
 #define help_ping "usage: ping [OPTIONS] HOST\n\nCheck network connectivity by sending packets to a host and reporting\nits response.\n\nSend ICMP ECHO_REQUEST packets to ipv4 or ipv6 addresses and prints each\necho it receives back, with round trip time.\n\nOptions:\n-4, -6      Force IPv4 or IPv6\n-c CNT      Send CNT many packets\n-I IFACE/IP Source interface or address\n-q          Quiet, only displays output at start and when finished\n-s SIZE     Packet SIZE in bytes (default 56)\n-t TTL      Set Time (number of hops) To Live\n-W SEC      Seconds to wait for response after all packets sent (default 10)\n-w SEC      Exit after this many seconds\n\n"
 
 
 #define help_sleep "usage: sleep LENGTH\n\nWait before exiting. An optional suffix can be \"m\" (minutes), \"h\" (hours),\n\"d\" (days), or \"s\" (seconds, the default).\n\n\n"
 
-#define help_sed "usage: sed [-inr] [-e SCRIPT]...|SCRIPT [-f SCRIPT_FILE]... [FILE...]\n\nStream editor. Apply one or more editing SCRIPTs to each line of input\n(from FILE or stdin) producing output (by default to stdout).\n\n-e add SCRIPT to list\n-f  add contents of SCRIPT_FILE to list\n-i Edit each file in place.\n-n    No default output. (Use the p command to output matched lines.)\n-r     Use extended regular expression syntax.\n-s     Treat input files separately (implied by -i)\n\nA SCRIPT is a series of one or more COMMANDs separated by newlines or\nsemicolons. All -e SCRIPTs are concatenated together as if separated\nby newlines, followed by all lines from -f SCRIPT_FILEs, in order.\nIf no -e or -f SCRIPTs are specified, the first argument is the SCRIPT.\n\nEach COMMAND may be preceded by an address which limits the command to\napply only to the specified line(s). Commands without an address apply to\nevery line. Addresses are of the form:\n\n  [ADDRESS[,ADDRESS]]COMMAND\n\nThe ADDRESS may be a decimal line number (starting at 1), a /regular\nexpression/ within a pair of forward slashes, or the character \"$\" which\nmatches the last line of input. (In -s or -i mode this matches the last\nline of each file, otherwise just the last line of the last file.) A single\naddress matches one line, a pair of comma separated addresses match\neverything from the first address to the second address (inclusive). If\nboth addresses are regular expressions, more than one range of lines in\neach file can match.\n\nREGULAR EXPRESSIONS in sed are started and ended by the same character\n(traditionally / but anything except a backslash or a newline works).\nBackslashes may be used to escape the delimiter if it occurs in the\nregex, and for the usual printf escapes (\\abcefnrtv and octal, hex,\nand unicode). An empty regex repeats the previous one. ADDRESS regexes\n(above) require the first delimeter to be escaped with a backslash when\nit isn't a forward slash (to distinguish it from the COMMANDs below).\n\nSed mostly operates on individual lines one at a time. It reads each line,\nprocesses it, and either writes it to the output or discards it before\nreading the next line. Sed can remember one additional line in a separate\nbuffer (using the h, H, g, G, and x commands), and can read the next line\nof input early (using the n and N command), but other than that command\nscripts operate on individual lines of text.\n\nEach COMMAND starts with a single character. The following commands take\nno arguments:\n\n  {  Start a new command block, continuing until a corresponding \"}\".\n     Command blocks may nest. If the block has an address, commands within\n     the block are only run for lines within the block's address range.\n\n  }  End command block (this command cannot have an address)\n\n  d  Delete this line and move on to the next one\n     (ignores remaining COMMANDs)\n\n  D  Delete one line of input and restart command SCRIPT (same as \"d\"\n     unless you've glued lines together with \"N\" or similar)\n\n  g  Get remembered line (overwriting current line)\n\n  G  Get remembered line (appending to current line)\n\n  h  Remember this line (overwriting remembered line)\n\n  H  Remember this line (appending to remembered line, if any)\n\n  l  Print line, escaping \\abfrtv (but not newline), octal escaping other\n     nonprintable characters, wrapping lines to terminal width with a\n     backslash, and appending $ to actual end of line.\n\n  n  Print default output and read next line, replacing current line\n     (If no next line available, quit processing script)\n\n  N  Append next line of input to this line, separated by a newline\n     (This advances the line counter for address matching and \"=\", if no\n     next line available quit processing script without default output)\n\n  p  Print this line\n\n  P  Print this line up to first newline (from \"N\")\n\n  q  Quit (print default output, no more commands processed or lines read)\n\n  x  Exchange this line with remembered line (overwrite in both directions)\n\n  =  Print the current line number (followed by a newline)\n\nThe following commands (may) take an argument. The \"text\" arguments (to\nthe \"a\", \"b\", and \"c\" commands) may end with an unescaped \"\\\" to append\nthe next line (for which leading whitespace is not skipped), and also\ntreat \";\" as a literal character (use \"\\;\" instead).\n\n  a [text]   Append text to output before attempting to read next line\n\n  b [label]  Branch, jumps to :label (or with no label, to end of SCRIPT)\n\n  c [text]   Delete line, output text at end of matching address range\n             (ignores remaining COMMANDs)\n\n  i [text]   Print text\n\n  r [file]   Append contents of file to output before attempting to read\n             next line.\n\n  s/S/R/F    Search for regex S, replace matched text with R using flags F.\n             The first character after the \"s\" (anything but newline or\n             backslash) is the delimiter, escape with \\ to use normally.\n\n             The replacement text may contain \"&\" to substitute the matched\n             text (escape it with backslash for a literal &), or \\1 through\n             \\9 to substitute a parenthetical subexpression in the regex.\n             You can also use the normal backslash escapes such as \\n and\n             a backslash at the end of the line appends the next line.\n\n             The flags are:\n\n             [0-9]    A number, substitute only that occurrence of pattern\n             g        Global, substitute all occurrences of pattern\n             i        Ignore case when matching\n             p        Print the line if match was found and replaced\n             w [file] Write (append) line to file if match replaced\n\n  t [label]  Test, jump to :label only if an \"s\" command found a match in\n             this line since last test (replacing with same text counts)\n\n  T [label]  Test false, jump only if \"s\" hasn't found a match.\n\n  w [file]   Write (append) line to file\n\n  y/old/new/ Change each character in 'old' to corresponding character\n             in 'new' (with standard backslash escapes, delimiter can be\n             any repeated character except \\ or \\n)\n\n  : [label]  Labeled target for jump commands\n\n  #  Comment, ignore rest of this line of SCRIPT\n\nDeviations from posix: allow extended regular expressions with -r,\nediting in place with -i, separate with -s, printf escapes in text, line\ncontinuations, semicolons after all commands, 2-address anywhere an\naddress is allowed, \"T\" command, multiline continuations for [abc],\n\\; to end [abc] argument before end of line.\n\n"
+#define help_sed "usage: sed [-inrE] [-e SCRIPT]...|SCRIPT [-f SCRIPT_FILE]... [FILE...]\n\nStream editor. Apply one or more editing SCRIPTs to each line of input\n(from FILE or stdin) producing output (by default to stdout).\n\n-e        add SCRIPT to list\n-f  add contents of SCRIPT_FILE to list\n-i Edit each file in place.\n-n    No default output. (Use the p command to output matched lines.)\n-r     Use extended regular expression syntax.\n-E     Alias for -r.\n-s       Treat input files separately (implied by -i)\n\nA SCRIPT is a series of one or more COMMANDs separated by newlines or\nsemicolons. All -e SCRIPTs are concatenated together as if separated\nby newlines, followed by all lines from -f SCRIPT_FILEs, in order.\nIf no -e or -f SCRIPTs are specified, the first argument is the SCRIPT.\n\nEach COMMAND may be preceded by an address which limits the command to\napply only to the specified line(s). Commands without an address apply to\nevery line. Addresses are of the form:\n\n  [ADDRESS[,ADDRESS]]COMMAND\n\nThe ADDRESS may be a decimal line number (starting at 1), a /regular\nexpression/ within a pair of forward slashes, or the character \"$\" which\nmatches the last line of input. (In -s or -i mode this matches the last\nline of each file, otherwise just the last line of the last file.) A single\naddress matches one line, a pair of comma separated addresses match\neverything from the first address to the second address (inclusive). If\nboth addresses are regular expressions, more than one range of lines in\neach file can match.\n\nREGULAR EXPRESSIONS in sed are started and ended by the same character\n(traditionally / but anything except a backslash or a newline works).\nBackslashes may be used to escape the delimiter if it occurs in the\nregex, and for the usual printf escapes (\\abcefnrtv and octal, hex,\nand unicode). An empty regex repeats the previous one. ADDRESS regexes\n(above) require the first delimeter to be escaped with a backslash when\nit isn't a forward slash (to distinguish it from the COMMANDs below).\n\nSed mostly operates on individual lines one at a time. It reads each line,\nprocesses it, and either writes it to the output or discards it before\nreading the next line. Sed can remember one additional line in a separate\nbuffer (using the h, H, g, G, and x commands), and can read the next line\nof input early (using the n and N command), but other than that command\nscripts operate on individual lines of text.\n\nEach COMMAND starts with a single character. The following commands take\nno arguments:\n\n  {  Start a new command block, continuing until a corresponding \"}\".\n     Command blocks may nest. If the block has an address, commands within\n     the block are only run for lines within the block's address range.\n\n  }  End command block (this command cannot have an address)\n\n  d  Delete this line and move on to the next one\n     (ignores remaining COMMANDs)\n\n  D  Delete one line of input and restart command SCRIPT (same as \"d\"\n     unless you've glued lines together with \"N\" or similar)\n\n  g  Get remembered line (overwriting current line)\n\n  G  Get remembered line (appending to current line)\n\n  h  Remember this line (overwriting remembered line)\n\n  H  Remember this line (appending to remembered line, if any)\n\n  l  Print line, escaping \\abfrtv (but not newline), octal escaping other\n     nonprintable characters, wrapping lines to terminal width with a\n     backslash, and appending $ to actual end of line.\n\n  n  Print default output and read next line, replacing current line\n     (If no next line available, quit processing script)\n\n  N  Append next line of input to this line, separated by a newline\n     (This advances the line counter for address matching and \"=\", if no\n     next line available quit processing script without default output)\n\n  p  Print this line\n\n  P  Print this line up to first newline (from \"N\")\n\n  q  Quit (print default output, no more commands processed or lines read)\n\n  x  Exchange this line with remembered line (overwrite in both directions)\n\n  =  Print the current line number (followed by a newline)\n\nThe following commands (may) take an argument. The \"text\" arguments (to\nthe \"a\", \"b\", and \"c\" commands) may end with an unescaped \"\\\" to append\nthe next line (for which leading whitespace is not skipped), and also\ntreat \";\" as a literal character (use \"\\;\" instead).\n\n  a [text]   Append text to output before attempting to read next line\n\n  b [label]  Branch, jumps to :label (or with no label, to end of SCRIPT)\n\n  c [text]   Delete line, output text at end of matching address range\n             (ignores remaining COMMANDs)\n\n  i [text]   Print text\n\n  r [file]   Append contents of file to output before attempting to read\n             next line.\n\n  s/S/R/F    Search for regex S, replace matched text with R using flags F.\n             The first character after the \"s\" (anything but newline or\n             backslash) is the delimiter, escape with \\ to use normally.\n\n             The replacement text may contain \"&\" to substitute the matched\n             text (escape it with backslash for a literal &), or \\1 through\n             \\9 to substitute a parenthetical subexpression in the regex.\n             You can also use the normal backslash escapes such as \\n and\n             a backslash at the end of the line appends the next line.\n\n             The flags are:\n\n             [0-9]    A number, substitute only that occurrence of pattern\n             g        Global, substitute all occurrences of pattern\n             i        Ignore case when matching\n             p        Print the line if match was found and replaced\n             w [file] Write (append) line to file if match replaced\n\n  t [label]  Test, jump to :label only if an \"s\" command found a match in\n             this line since last test (replacing with same text counts)\n\n  T [label]  Test false, jump only if \"s\" hasn't found a match.\n\n  w [file]   Write (append) line to file\n\n  y/old/new/ Change each character in 'old' to corresponding character\n             in 'new' (with standard backslash escapes, delimiter can be\n             any repeated character except \\ or \\n)\n\n  : [label]  Labeled target for jump commands\n\n  #  Comment, ignore rest of this line of SCRIPT\n\nDeviations from posix: allow extended regular expressions with -r,\nediting in place with -i, separate with -s, printf escapes in text, line\ncontinuations, semicolons after all commands, 2-address anywhere an\naddress is allowed, \"T\" command, multiline continuations for [abc],\n\\; to end [abc] argument before end of line.\n\n"
 
 #define help_rmdir "usage: rmdir [-p] [dirname...]\n\nRemove one or more directories.\n\n-p    Remove path.\n\n"
 
index 6f1c244..0adbe6a 100644 (file)
@@ -121,7 +121,7 @@ USE_MIX(NEWTOY(mix, "c:d:l#r#", TOYFLAG_USR|TOYFLAG_BIN))
 USE_MKDIR(NEWTOY(mkdir, "<1vpm:", TOYFLAG_BIN|TOYFLAG_UMASK))
 USE_MKE2FS(NEWTOY(mke2fs, "<1>2g:Fnqm#N#i#b#", TOYFLAG_SBIN))
 USE_MKFIFO(NEWTOY(mkfifo, "<1m:", TOYFLAG_BIN))
-USE_MKNOD(NEWTOY(mknod, "<2>4", TOYFLAG_BIN))
+USE_MKNOD(NEWTOY(mknod, "<2>4m(mode):", TOYFLAG_BIN|TOYFLAG_UMASK))
 USE_MKPASSWD(NEWTOY(mkpasswd, ">2S:m:P#=0<0", TOYFLAG_USR|TOYFLAG_BIN))
 USE_MKSWAP(NEWTOY(mkswap, "<1>1", TOYFLAG_SBIN))
 USE_MKTEMP(NEWTOY(mktemp, ">1qd(directory)p(tmpdir):", TOYFLAG_BIN))
@@ -141,7 +141,7 @@ USE_NL(NEWTOY(nl, "v#<1=1l#b:n:s:w#<0=6E", TOYFLAG_BIN))
 USE_NOHUP(NEWTOY(nohup, "<1^", TOYFLAG_USR|TOYFLAG_BIN))
 USE_NSENTER(NEWTOY(nsenter, "<1F(no-fork)t#<1(target)i:(ipc);m:(mount);n:(net);p:(pid);u:(uts);U:(user);", TOYFLAG_USR|TOYFLAG_BIN))
 USE_OD(NEWTOY(od, "j#vN#xsodcbA:t*", TOYFLAG_USR|TOYFLAG_BIN))
-USE_ONEIT(NEWTOY(oneit, "^<1c:p", TOYFLAG_SBIN))
+USE_ONEIT(NEWTOY(oneit, "^<1nc:p3[!pn]", TOYFLAG_SBIN))
 USE_OPENVT(NEWTOY(openvt, "c#<1>63sw", TOYFLAG_BIN|TOYFLAG_NEEDROOT))
 USE_PARTPROBE(NEWTOY(partprobe, "<1", TOYFLAG_SBIN))
 USE_PASSWD(NEWTOY(passwd, ">1a:dlu", TOYFLAG_STAYROOT|TOYFLAG_USR|TOYFLAG_BIN))
@@ -171,11 +171,11 @@ USE_RM(NEWTOY(rm, "fiRr[-fi]", TOYFLAG_BIN))
 USE_RMDIR(NEWTOY(rmdir, "<1p", TOYFLAG_BIN))
 USE_RMMOD(NEWTOY(rmmod, "<1wf", TOYFLAG_BIN|TOYFLAG_NEEDROOT))
 USE_ROUTE(NEWTOY(route, "?neA:", TOYFLAG_BIN))
-USE_SED(NEWTOY(sed, "(version)e*f*inr", TOYFLAG_USR|TOYFLAG_BIN|TOYFLAG_LOCALE))
+USE_SED(NEWTOY(sed, "(version)e*f*inEr[+Er]", TOYFLAG_USR|TOYFLAG_BIN|TOYFLAG_LOCALE))
 USE_SEQ(NEWTOY(seq, "<1>3?f:s:", TOYFLAG_USR|TOYFLAG_BIN))
 USE_SETENFORCE(NEWTOY(setenforce, "<1", TOYFLAG_USR|TOYFLAG_SBIN))
 USE_SETSID(NEWTOY(setsid, "^<1t", TOYFLAG_USR|TOYFLAG_BIN))
-USE_SH(NEWTOY(sh, "c:"USE_SH_INTERACTIVE("i"), TOYFLAG_BIN))
+USE_SH(NEWTOY(sh, "c:i", TOYFLAG_BIN))
 USE_SHA1SUM(NEWTOY(sha1sum, "b", TOYFLAG_USR|TOYFLAG_BIN))
 USE_SHRED(NEWTOY(shred, "<1zxus#<1n#<1o#<0f", TOYFLAG_USR|TOYFLAG_BIN))
 USE_SKELETON(NEWTOY(skeleton, "(walrus)(blubber):;(also):e@d*c#b:a", TOYFLAG_USR|TOYFLAG_BIN))
@@ -204,7 +204,7 @@ USE_TELNETD(NEWTOY(telnetd, "w#<0b:p#<0>65535=23f:l:FSKi[!wi]", TOYFLAG_USR|TOYF
 USE_TEST(NEWTOY(test, NULL, TOYFLAG_USR|TOYFLAG_BIN))
 USE_TFTPD(NEWTOY(tftpd, "rcu:l", TOYFLAG_BIN))
 USE_TIME(NEWTOY(time, "<1^p", TOYFLAG_USR|TOYFLAG_BIN))
-USE_TIMEOUT(NEWTOY(timeout, "<2^k:s: ", TOYFLAG_BIN))
+USE_TIMEOUT(NEWTOY(timeout, "<2^vk:s: ", TOYFLAG_BIN))
 USE_TOP(NEWTOY(top, ">0d#=3n#<1mb", TOYFLAG_USR|TOYFLAG_BIN))
 USE_TOUCH(NEWTOY(touch, "acd:mr:t:h[!dtr]", TOYFLAG_BIN))
 USE_SH(OLDTOY(toysh, sh, TOYFLAG_BIN))
@@ -220,7 +220,7 @@ USE_UNAME(NEWTOY(uname, "oamvrns[+os]", TOYFLAG_BIN))
 USE_UNIQ(NEWTOY(uniq, "f#s#w#zicdu", TOYFLAG_BIN))
 USE_UNIX2DOS(NEWTOY(unix2dos, 0, TOYFLAG_BIN))
 USE_UNLINK(NEWTOY(unlink, "<1>1", TOYFLAG_USR|TOYFLAG_BIN))
-USE_UNSHARE(NEWTOY(unshare, "<1^imnpuU", TOYFLAG_USR|TOYFLAG_BIN))
+USE_UNSHARE(NEWTOY(unshare, "<1^rimnpuU", TOYFLAG_USR|TOYFLAG_BIN))
 USE_UPTIME(NEWTOY(uptime, NULL, TOYFLAG_USR|TOYFLAG_BIN))
 USE_USERADD(NEWTOY(useradd, "<1>2u#<0G:s:g:h:SDH", TOYFLAG_NEEDROOT|TOYFLAG_UMASK|TOYFLAG_SBIN))
 USE_USERDEL(NEWTOY(userdel, "<1>1r", TOYFLAG_NEEDROOT|TOYFLAG_SBIN))