OSDN Git Service

Update generated files after toybox sync.
authorElliott Hughes <enh@google.com>
Mon, 4 Jan 2016 20:28:44 +0000 (12:28 -0800)
committerElliott Hughes <enh@google.com>
Mon, 4 Jan 2016 20:28:44 +0000 (12:28 -0800)
Change-Id: I61a6e7b160133ecf271aa28bf5d5de63191b3bcb

.config
.gitignore
generated/config.h
generated/flags.h
generated/globals.h
generated/help.h
generated/newtoys.h
generated/tags.h [new file with mode: 0644]

diff --git a/.config b/.config
index 15f9cbb..2cef7fd 100644 (file)
--- a/.config
+++ b/.config
@@ -101,6 +101,7 @@ CONFIG_UNIQ=y
 # CONFIG_UNLINK is not set
 # CONFIG_UUDECODE is not set
 # CONFIG_UUENCODE is not set
+# CONFIG_VI is not set
 CONFIG_WC=y
 # CONFIG_WHO is not set
 CONFIG_XARGS=y
@@ -141,6 +142,7 @@ CONFIG_EXPR=y
 CONFIG_HWCLOCK=y
 # CONFIG_ICONV is not set
 # CONFIG_INIT is not set
+# CONFIG_IOTOP is not set
 # CONFIG_IP is not set
 # CONFIG_IPCRM is not set
 # CONFIG_IPCS is not set
@@ -294,6 +296,7 @@ CONFIG_UMOUNT=y
 # CONFIG_SKELETON_ALIAS is not set
 # CONFIG_TEST_HUMAN_READABLE is not set
 # CONFIG_TEST_MANY_OPTIONS is not set
+# CONFIG_TEST_SCANKEY is not set
 
 #
 # Android
@@ -327,3 +330,4 @@ CONFIG_TOYBOX_I18N=y
 # CONFIG_TOYBOX_DEBUG is not set
 CONFIG_TOYBOX_UID_SYS=100
 CONFIG_TOYBOX_UID_USR=500
+# CONFIG_TOYBOX_MUSL_NOMMU_IS_BROKEN is not set
index c63a726..4d0cf13 100644 (file)
@@ -8,6 +8,7 @@ change/
 /generated/Config.probed
 /generated/flags.raw
 /generated/mkflags
+/generated/mktags
 /generated/obj
 /generated/optlibs.dat
 /kconfig
index ac67530..6c63172 100644 (file)
 #define USE_UUDECODE(...)
 #define CFG_UUENCODE 0
 #define USE_UUENCODE(...)
+#define CFG_VI 0
+#define USE_VI(...)
 #define CFG_WC 1
 #define USE_WC(...) __VA_ARGS__
 #define CFG_WHO 0
 #define USE_ICONV(...)
 #define CFG_INIT 0
 #define USE_INIT(...)
+#define CFG_IOTOP 0
+#define USE_IOTOP(...)
 #define CFG_IP 0
 #define USE_IP(...)
 #define CFG_IPCRM 0
 #define USE_TEST_HUMAN_READABLE(...)
 #define CFG_TEST_MANY_OPTIONS 0
 #define USE_TEST_MANY_OPTIONS(...)
+#define CFG_TEST_SCANKEY 0
+#define USE_TEST_SCANKEY(...)
 #define CFG_GETENFORCE 1
 #define USE_GETENFORCE(...) __VA_ARGS__
 #define CFG_GETPROP 1
 #define USE_TOYBOX_DEBUG(...)
 #define CFG_TOYBOX_UID_SYS 100
 #define CFG_TOYBOX_UID_USR 500
+#define CFG_TOYBOX_MUSL_NOMMU_IS_BROKEN 0
+#define USE_TOYBOX_MUSL_NOMMU_IS_BROKEN(...)
index 7c47bfb..976a9df 100644 (file)
 #undef FOR_iorenice
 #endif
 
+// iotop   Aabkoqp*u*d#n#
+#undef OPTSTR_iotop
+#define OPTSTR_iotop  0 
+#ifdef CLEANUP_iotop
+#undef CLEANUP_iotop
+#undef FOR_iotop
+#undef FLAG_n
+#undef FLAG_d
+#undef FLAG_u
+#undef FLAG_p
+#undef FLAG_q
+#undef FLAG_o
+#undef FLAG_k
+#undef FLAG_b
+#undef FLAG_a
+#undef FLAG_A
+#endif
+
 // ip    
 #undef OPTSTR_ip
 #define OPTSTR_ip  0 
 #undef FOR_mkswap
 #endif
 
-// mktemp >1qd(directory)p(tmpdir): >1qd(directory)p(tmpdir):
+// mktemp >1uqd(directory)p(tmpdir): >1uqd(directory)p(tmpdir):
 #undef OPTSTR_mktemp
-#define OPTSTR_mktemp ">1qd(directory)p(tmpdir):"
+#define OPTSTR_mktemp ">1uqd(directory)p(tmpdir):"
 #ifdef CLEANUP_mktemp
 #undef CLEANUP_mktemp
 #undef FOR_mktemp
 #undef FLAG_directory
 #undef FLAG_d
 #undef FLAG_q
+#undef FLAG_u
 #endif
 
 // modinfo <1b:k:F:0 <1b:k:F:0
 #undef FLAG_Z
 #endif
 
+// test_scankey    
+#undef OPTSTR_test_scankey
+#define OPTSTR_test_scankey  0 
+#ifdef CLEANUP_test_scankey
+#undef CLEANUP_test_scankey
+#undef FOR_test_scankey
+#endif
+
 // tftp   <1b#<8>65464r:l:g|p|[!gp]
 #undef OPTSTR_tftp
 #define OPTSTR_tftp  0 
 #undef FOR_vconfig
 #endif
 
+// vi   <1>1
+#undef OPTSTR_vi
+#define OPTSTR_vi  0 
+#ifdef CLEANUP_vi
+#undef CLEANUP_vi
+#undef FOR_vi
+#endif
+
 // vmstat >2n >2n
 #undef OPTSTR_vmstat
 #define OPTSTR_vmstat ">2n"
 #endif
 #endif
 
+#ifdef FOR_iotop
+#ifndef TT
+#define TT this.iotop
+#endif
+#define FLAG_n (FORCED_FLAG<<0)
+#define FLAG_d (FORCED_FLAG<<1)
+#define FLAG_u (FORCED_FLAG<<2)
+#define FLAG_p (FORCED_FLAG<<3)
+#define FLAG_q (FORCED_FLAG<<4)
+#define FLAG_o (FORCED_FLAG<<5)
+#define FLAG_k (FORCED_FLAG<<6)
+#define FLAG_b (FORCED_FLAG<<7)
+#define FLAG_a (FORCED_FLAG<<8)
+#define FLAG_A (FORCED_FLAG<<9)
+#endif
+
 #ifdef FOR_ip
 #ifndef TT
 #define TT this.ip
 #define FLAG_directory (1<<1)
 #define FLAG_d (1<<1)
 #define FLAG_q (1<<2)
+#define FLAG_u (1<<3)
 #endif
 
 #ifdef FOR_modinfo
 #define FLAG_Z (FORCED_FLAGLL<<51)
 #endif
 
+#ifdef FOR_test_scankey
+#ifndef TT
+#define TT this.test_scankey
+#endif
+#endif
+
 #ifdef FOR_tftp
 #ifndef TT
 #define TT this.tftp
 #endif
 #endif
 
+#ifdef FOR_vi
+#ifndef TT
+#define TT this.vi
+#endif
+#endif
+
 #ifdef FOR_vmstat
 #ifndef TT
 #define TT this.vmstat
index 0f53409..f33059f 100644 (file)
@@ -889,6 +889,13 @@ struct useradd_data {
   long gid;
 };
 
+// toys/pending/vi.c
+
+struct vi_data {
+  struct linestack *ls;
+  char *statline;
+};
+
 // toys/pending/watch.c
 
 struct watch_data {
@@ -1145,16 +1152,23 @@ struct ps_data {
       long n;
       long d;
     } ttop;
+    struct {
+      long n;
+      long d;
+      struct arg_list *u;
+      struct arg_list *p;
+    } iotop;
   };
 
   struct sysinfo si;
   struct ptr_len gg, GG, pp, PP, ss, tt, uu, UU;
-  unsigned width;
+  unsigned width, height;
   dev_t tty;
   void *fields, *kfields;
-  long long ticks, bits;
+  long long ticks, bits, ioread, iowrite, aioread, aiowrite;
   size_t header_len;
-  int kcount;
+  int kcount, ksave, forcek;
+  int (*match_process)(long long *slot);
 };
 
 // toys/posix/renice.c
@@ -1214,7 +1228,7 @@ struct tail_data {
   long lines;
   long bytes;
 
-  int file_no;
+  int file_no, ffd, *files;
 };
 
 // toys/posix/tee.c
@@ -1357,6 +1371,7 @@ extern union global_union {
        struct tr_data tr;
        struct traceroute_data traceroute;
        struct useradd_data useradd;
+       struct vi_data vi;
        struct watch_data watch;
        struct chgrp_data chgrp;
        struct chmod_data chmod;
index 526833f..0722913 100644 (file)
@@ -42,7 +42,9 @@
 
 #define help_getenforce "usage: getenforce\n\nShows whether SELinux is disabled, enforcing, or permissive.\n\n"
 
-#define help_test_many_options "usage: test_many_options -[a-zA-Z]\n\nPrint the optflags value of the command arguments, in hex.\n\n\n"
+#define help_test_scankey "usage: test_scankey\n\nMove a letter around the screen. Hit ESC to exit.\n\n\n"
+
+#define help_test_many_options "usage: test_many_options -[a-zA-Z]\n\nPrint the optflags value of the command arguments, in hex.\n\n"
 
 #define help_test_human_readable "usage: test_human_readable [-sbi] NUMBER\n\n"
 
@@ -66,7 +68,7 @@
 
 #define help_mount "usage: mount [-afFrsvw] [-t TYPE] [-o OPTIONS...] [[DEVICE] DIR]\n\nMount new filesystem(s) on directories. With no arguments, display existing\nmounts.\n\n-a     mount all entries in /etc/fstab (with -t, only entries of that TYPE)\n-O        only mount -a entries that have this option\n-f fake it (don't actually mount)\n-r      read only (same as -o ro)\n-w   read/write (default, same as -o rw)\n-t specify filesystem type\n-v     verbose\n\nOPTIONS is a comma separated list of options, which can also be supplied\nas --longopts.\n\nThis mount autodetects loopback mounts (a file on a directory) and\nbind mounts (file on file, directory on directory), so you don't need\nto say --bind or --loop. You can also \"mount -a /path\" to mount everything\nin /etc/fstab under /path, even if it's noauto.\n\n\n"
 
-#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_mktemp "usage: mktemp [-dqu] [-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-u    Don't create anything, just print what would be created\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_z "usage: mknod [-Z CONTEXT] ...\n\n-Z      Set security context to created file\n\n"
 
 
 #define help_watch "usage: watch [-n SEC] [-t] PROG ARGS\n\nRun PROG periodically\n\n-n  Loop period in seconds (default 2)\n-t  Don't print header\n-e  Freeze updates on command error, and exit after enter.\n\n"
 
+#define help_vi "usage: vi FILE\n\nVisual text editor. Predates the existence of standardized cursor keys,\nso the controls are weird and historical.\n\n"
+
 #define help_userdel "usage: userdel [-r] USER\nusage: deluser [-r] USER\n\nOptions:\n-r remove home directory\nDelete USER from the SYSTEM\n\n"
 
 #define help_useradd "usage: useradd [-SDH] [-h DIR] [-s SHELL] [-G GRP] [-g NAME] [-u UID] USER [GROUP]\n\nCreate new user, or add USER to GROUP\n\n-D       Don't assign a password\n-g NAME  Real name\n-G GRP   Add user to existing group\n-h DIR   Home directory\n-H       Don't create home directory\n-s SHELL Login shell\n-S       Create a system user\n-u UID   User id\n\n"
 
 #define help_tail_seek "This version uses lseek, which is faster on large files.\n\n"
 
-#define help_tail "usage: tail [-n|c NUMBER] [-f] [FILE...]\n\nCopy last lines from files to stdout. If no files listed, copy from\nstdin. Filename \"-\" is a synonym for stdin.\n\n-n        output the last NUMBER lines (default 10), +X counts from start.\n-c    output the last NUMBER bytes, +NUMBER counts from start\n#-f    follow FILE(s), waiting for more data to be appended [TODO]\n\n"
+#define help_tail "usage: tail [-n|c NUMBER] [-f] [FILE...]\n\nCopy last lines from files to stdout. If no files listed, copy from\nstdin. Filename \"-\" is a synonym for stdin.\n\n-n        output the last NUMBER lines (default 10), +X counts from start.\n-c    output the last NUMBER bytes, +NUMBER counts from start\n-f     follow FILE(s), waiting for more data to be appended\n\n"
 
 #define help_strings "usage: strings [-fo] [-n LEN] [FILE...]\n\nDisplay printable strings in a binary file\n\n-f      Precede strings with filenames\n-n      At least LEN characters form a string (default 4)\n-o   Precede strings with decimal offsets\n\n"
 
 
 #define help_pwd "usage: pwd [-L|-P]\n\nPrint working (current) directory.\n\n-L  Use shell's path from $PWD (when applicable)\n-P  Print cannonical absolute path\n\n"
 
-#define help_ttop "\n"
+#define help_iotop "usage: iotop [-Aabkoq] [-n NUMBER] [-d SECONDS] [-p PID,] [-u USER,]\n\nRank processes by I/O.\n\n-A       All I/O, not just disk\n-a      Accumulated I/O (not percentage)\n-b    Batch mode (no tty)\n-d Delay SECONDS between each cycle (default 3)\n-k        Kilobytes\n-n   Exit after NUMBER iterations\n-o        Only show processes doing I/O\n-p       Show these PIDs\n-q     Quiet (no header lines)\n-u     Show these USERs\n\n"
+
+#define help_ttop "usage: ttop [-mb] [ -d seconds ] [ -n iterations ]\n\ntodo: implement top\n\nProvide a view of process activity in real time.\nKeys\n   N/M/P/T show CPU usage, sort by pid/mem/cpu/time\n   S       show memory\n   R       reverse sort\n   H       toggle threads\n   C,1     toggle SMP\n   Q,^C    exit\n\nOptions\n   -n Iterations before exiting\n   -d Delay between updates\n   -m Same as 's' key\n   -b Batch mode\n\n"
 
-#define help_ps "usage: ps [-AadeflnwZ] [-gG GROUP,] [-k FIELD,] [-o FIELD,] [-p PID,] [-t TTY,] [-uU USER,]\n\nList processes.\n\nWhich processes to show (selections may be comma separated lists):\n\n-A    All processes\n-a       Processes with terminals that aren't session leaders\n-d        All processes that aren't session leaders\n-e   Same as -A\n-g  Belonging to GROUPs\n-G Belonging to real GROUPs (before sgid)\n-p      PIDs (--pid)\n-P        Parent PIDs (--ppid)\n-s        In session IDs\n-t      Attached to selected TTYs\n-u   Owned by USERs\n-U      Owned by real USERs (before suid)\n\nOutput modifiers:\n\n-k    Sort FIELDs in +increasing or -decreasting order (--sort)\n-n   Show numeric USER and GROUP\n-w Wide output (don't truncate at terminal width)\n\nWhich FIELDs to show. (Default = -o PID,TTY,TIME,CMD)\n\n-f   Full listing (-o USER:8=UID,PID,PPID,C,STIME,TTY,TIME,CMD)\n-l  Long listing (-o F,S,UID,PID,PPID,C,PRI,NI,ADDR,SZ,WCHAN,TTY,TIME,CMD)\n-o      Output the listed FIELDs, each with optional :size and/or =title\n-Z    Include LABEL\n\nAvailable -o FIELDs:\n\n  ADDR    Instruction pointer\n  CMD     Command name (original)\n  CMDLINE Command name (current argv[0])\n  COMM    Command line (with arguments)\n  CPU     Which processor is process running on\n  ETIME   Elapsed time since process start\n  F       Process flags (PF_*) from linux source file include/sched.h\n          (in octal rather than hex because posix)\n  GID     Group id\n  GROUP   Group name\n  LABEL   Security label\n  MAJFL   Major page faults\n  MINFL   Minor page faults\n  NI      Niceness of process (lower niceness is higher priority)\n  PCPU    Percentage of CPU time used\n  PGID    Process Group ID\n  PID     Process ID\n  PPID    Parent Process ID\n  PRI     Priority\n  RGID    Real (before sgid) group ID\n  RGROUP  Real (before sgid) group name\n  RSS     Resident Set Size (memory currently used)\n  RUID    Real (before suid) user ID\n  RUSER   Real (before suid) user name\n  S       Process state:\n          R (running) S (sleeping) D (disk sleep) T (stopped)  t (traced)\n          Z (zombie)  X (dead)     x (dead)       K (wakekill) W (waking)\n  STAT    Process state (S) plus:\n          < high priority          N low priority L locked memory\n          s session leader         + foreground   l multithreaded\n  STIME   Start time of process in hh:mm (size :19 shows yyyy-mm-dd hh:mm:ss)\n  SZ      Memory Size (4k pages needed to completely swap out process)\n  TIME    CPU time consumed\n  TTY     Controlling terminal\n  UID     User id\n  USER    User name\n  VSZ     Virtual memory size (1k units)\n  WCHAN   Waiting in kernel for\n\n"
+#define help_ps "usage: ps [-AadeflnwZ] [-gG GROUP,] [-k FIELD,] [-o FIELD,] [-p PID,] [-t TTY,] [-uU USER,]\n\nList processes.\n\nWhich processes to show (selections may be comma separated lists):\n\n-A    All processes\n-a       Processes with terminals that aren't session leaders\n-d        All processes that aren't session leaders\n-e   Same as -A\n-g  Belonging to GROUPs\n-G Belonging to real GROUPs (before sgid)\n-p      PIDs (--pid)\n-P        Parent PIDs (--ppid)\n-s        In session IDs\n-t      Attached to selected TTYs\n-u   Owned by USERs\n-U      Owned by real USERs (before suid)\n\nOutput modifiers:\n\n-k    Sort FIELDs in +increasing or -decreasting order (--sort)\n-n   Show numeric USER and GROUP\n-w Wide output (don't truncate at terminal width)\n\nWhich FIELDs to show. (Default = -o PID,TTY,TIME,CMD)\n\n-f   Full listing (-o USER:8=UID,PID,PPID,C,STIME,TTY,TIME,CMD)\n-l  Long listing (-o F,S,UID,PID,PPID,C,PRI,NI,ADDR,SZ,WCHAN,TTY,TIME,CMD)\n-o      Output the listed FIELDs, each with optional :size and/or =title\n-Z    Include LABEL\n\nAvailable -o FIELDs:\n\n  ADDR    Instruction pointer\n  ARGS    Command line (argv[0-X] minus path)\n  CMD     COMM without -f, ARGS with -f\n  CMDLINE Command line (argv[0-X])\n  COMM    Original command name\n  COMMAND Original command path\n  CPU     Which processor running on\n  ETIME   Elapsed time since process start\n  F       Flags (1=FORKNOEXEC, 4=SUPERPRIV)\n  GID     Group id\n  GROUP   Group name\n  LABEL   Security label\n  MAJFL   Major page faults\n  MINFL   Minor page faults\n  NAME    Command name (argv[0])\n  NI      Niceness (lower is faster)\n  PCPU    Percentage of CPU time used\n  PGID    Process Group ID\n  PID     Process ID\n  PPID    Parent Process ID\n  PRI     Priority (higher is faster)\n  PSR     Processor last executed on\n  RGID    Real (before sgid) group ID\n  RGROUP  Real (before sgid) group name\n  RSS     Resident Set Size (memory in use, 4k pages)\n  RTPRIO  Realtime priority\n  RUID    Real (before suid) user ID\n  RUSER   Real (before suid) user name\n  S       Process state:\n          R (running) S (sleeping) D (device I/O) T (stopped)  t (traced)\n          Z (zombie)  X (deader)   x (dead)       K (wakekill) W (waking)\n  SCHED   Scheduling policy (0=other, 1=fifo, 2=rr, 3=batch, 4=iso, 5=idle)\n  STAT    Process state (S) plus:\n          < high priority          N low priority L locked memory\n          s session leader         + foreground   l multithreaded\n  STIME   Start time of process in hh:mm (size :19 shows yyyy-mm-dd hh:mm:ss)\n  SZ      Memory Size (4k pages needed to completely swap out process)\n  TIME    CPU time consumed\n  TTY     Controlling terminal\n  UID     User id\n  USER    User name\n  VSZ     Virtual memory size (1k units)\n  WCHAN   Waiting in kernel for\n\n  You can put a % after SZ, RSS\n  to get percentage\n\n"
 
 #define help_printf "usage: printf FORMAT [ARGUMENT...]\n\nFormat and print ARGUMENT(s) according to FORMAT, using C printf syntax\n(% escapes for cdeEfgGiosuxX, \\ escapes for abefnrtv0 or \\OCTAL or \\xHEX).\n\n"
 
 
 #define help_mv "usage: mv [-finv] SOURCE... DEST\"\n\n-f      force copy by deleting destination file\n-i     interactive, prompt before overwriting existing DEST\n-n        no clobber (don't overwrite DEST)\n-v   verbose\n"
 
-#define help_cp_preserve "-i   interactive, prompt before overwriting existing DEST\n-l        hard link instead of copy\n-n   no clobber (don't overwrite DEST)\n-p   preserve timestamps, ownership, and permissions\n-r     synonym for -R\n-s      symlink instead of copy\n-v     verbose\nletter(s) of:\n\n        mode - permissions (ignore umask for rwx, copy suid and sticky bit)\n   ownership - user and group\n  timestamps - file creation, modification, and access times.\n         all - all of the above\nusage: cp [--preserve=mota] [-adlnrsv] [-fipRHLP] SOURCE... DEST\n\nCopy files from SOURCE to DEST.  If more than one SOURCE, DEST must\nbe a directory.\n\n--preserve takes either a comma separated list of attributes, or the first\n-F        delete any existing destination file first (--remove-destination)\n-H   Follow symlinks listed on command line\n-L      Follow all symlinks\n-P Do not follow symlinks [default]\n-R    recurse into subdirectories (DEST must be a directory)\n-a      same as -dpr\n-d        don't dereference symlinks\n-f  delete destination files we can't write to\n"
+#define help_cp_preserve "-i   interactive, prompt before overwriting existing DEST\n-l        hard link instead of copy\n-n   no clobber (don't overwrite DEST)\n-p   preserve timestamps, ownership, and mode\n-r    synonym for -R\n-s      symlink instead of copy\n-v     verbose\nletter(s) of:\n\n        mode - permissions (ignore umask for rwx, copy suid and sticky bit)\n   ownership - user and group\n  timestamps - file creation, modification, and access times.\n     context - security context\n       xattr - extended attributes\n         all - all of the above\nusage: cp [--preserve=motcxa] [-adlnrsv] [-fipRHLP] SOURCE... DEST\n\nCopy files from SOURCE to DEST.  If more than one SOURCE, DEST must\nbe a directory.\n\n--preserve takes either a comma separated list of attributes, or the first\n-F delete any existing destination file first (--remove-destination)\n-H   Follow symlinks listed on command line\n-L      Follow all symlinks\n-P Do not follow symlinks [default]\n-R    recurse into subdirectories (DEST must be a directory)\n-a      same as -dpr\n-d        don't dereference symlinks\n-f  delete destination files we can't write to\n"
 
-#define help_cp "usage: cp [--preserve=mota] [-adlnrsv] [-fipRHLP] SOURCE... DEST\n\nCopy files from SOURCE to DEST.  If more than one SOURCE, DEST must\nbe a directory.\n\n--preserve takes either a comma separated list of attributes, or the first\n-F    delete any existing destination file first (--remove-destination)\n-H   Follow symlinks listed on command line\n-L      Follow all symlinks\n-P Do not follow symlinks [default]\n-R    recurse into subdirectories (DEST must be a directory)\n-a      same as -dpr\n-d        don't dereference symlinks\n-f  delete destination files we can't write to\n-i  interactive, prompt before overwriting existing DEST\n-l        hard link instead of copy\n-n   no clobber (don't overwrite DEST)\n-p   preserve timestamps, ownership, and permissions\n-r     synonym for -R\n-s      symlink instead of copy\n-v     verbose\nletter(s) of:\n\n        mode - permissions (ignore umask for rwx, copy suid and sticky bit)\n   ownership - user and group\n  timestamps - file creation, modification, and access times.\n         all - all of the above\n"
+#define help_cp "usage: cp [--preserve=motcxa] [-adlnrsv] [-fipRHLP] SOURCE... DEST\n\nCopy files from SOURCE to DEST.  If more than one SOURCE, DEST must\nbe a directory.\n\n--preserve takes either a comma separated list of attributes, or the first\n-F  delete any existing destination file first (--remove-destination)\n-H   Follow symlinks listed on command line\n-L      Follow all symlinks\n-P Do not follow symlinks [default]\n-R    recurse into subdirectories (DEST must be a directory)\n-a      same as -dpr\n-d        don't dereference symlinks\n-f  delete destination files we can't write to\n-i  interactive, prompt before overwriting existing DEST\n-l        hard link instead of copy\n-n   no clobber (don't overwrite DEST)\n-p   preserve timestamps, ownership, and mode\n-r    synonym for -R\n-s      symlink instead of copy\n-v     verbose\nletter(s) of:\n\n        mode - permissions (ignore umask for rwx, copy suid and sticky bit)\n   ownership - user and group\n  timestamps - file creation, modification, and access times.\n     context - security context\n       xattr - extended attributes\n         all - all of the above\n"
 
 #define help_comm "usage: comm [-123] FILE1 FILE2\n\nReads FILE1 and FILE2, which should be ordered, and produces three text\ncolumns as output: lines only in FILE1; lines only in FILE2; and lines\nin both files. Filename \"-\" is a synonym for stdin.\n\n-1 suppress the output column of lines unique to FILE1\n-2 suppress the output column of lines unique to FILE2\n-3 suppress the output column of lines duplicated in FILE1 and FILE2\n\n"
 
index 941094b..16aeb8b 100644 (file)
@@ -102,6 +102,7 @@ USE_INSMOD(NEWTOY(insmod, "<1", TOYFLAG_SBIN|TOYFLAG_NEEDROOT))
 USE_INSTALL(NEWTOY(install, "<1cdDpsvm:o:g:", TOYFLAG_USR|TOYFLAG_BIN))
 USE_IONICE(NEWTOY(ionice, "^tc#<0>3=2n#<0>7=5p#", TOYFLAG_USR|TOYFLAG_BIN))
 USE_IORENICE(NEWTOY(iorenice, "?<1>3", TOYFLAG_USR|TOYFLAG_BIN))
+USE_IOTOP(NEWTOY(iotop, "Aabkoqp*u*d#n#", TOYFLAG_USR|TOYFLAG_BIN|TOYFLAG_STAYROOT))
 USE_IP(NEWTOY(ip, NULL, TOYFLAG_SBIN))
 USE_IP(OLDTOY(ipaddr, ip, TOYFLAG_SBIN))
 USE_IPCRM(NEWTOY(ipcrm, "m*M*s*S*q*Q*", TOYFLAG_USR|TOYFLAG_BIN))
@@ -138,7 +139,7 @@ USE_MKFIFO(NEWTOY(mkfifo, "<1"USE_MKFIFO_Z("Z:")"m:", TOYFLAG_USR|TOYFLAG_BIN))
 USE_MKNOD(NEWTOY(mknod, "<2>4m(mode):"USE_MKNOD_Z("Z:"), 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))
+USE_MKTEMP(NEWTOY(mktemp, ">1uqd(directory)p(tmpdir):", TOYFLAG_BIN))
 USE_MODINFO(NEWTOY(modinfo, "<1b:k:F:0", TOYFLAG_BIN))
 USE_MODPROBE(NEWTOY(modprobe, "alrqvsDb", TOYFLAG_SBIN))
 USE_MORE(NEWTOY(more, NULL, TOYFLAG_USR|TOYFLAG_BIN))
@@ -222,6 +223,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_TEST_HUMAN_READABLE(NEWTOY(test_human_readable, "<1>1ibs", 0))
 USE_TEST_MANY_OPTIONS(NEWTOY(test_many_options, "ZYXWVUTSRQPONMLKJIHGFEDCBAzyxwvutsrqponmlkjihgfedcba", TOYFLAG_USR|TOYFLAG_BIN))
+USE_TEST_SCANKEY(NEWTOY(test_scankey, 0, 0))
 USE_TFTP(NEWTOY(tftp, "<1b#<8>65464r:l:g|p|[!gp]", TOYFLAG_USR|TOYFLAG_BIN))
 USE_TFTPD(NEWTOY(tftpd, "rcu:l", TOYFLAG_BIN))
 USE_TIME(NEWTOY(time, "<1^p", TOYFLAG_USR|TOYFLAG_BIN))
@@ -250,6 +252,7 @@ USE_USLEEP(NEWTOY(usleep, "<1", TOYFLAG_BIN))
 USE_UUDECODE(NEWTOY(uudecode, ">1o:", TOYFLAG_USR|TOYFLAG_BIN|TOYFLAG_UMASK))
 USE_UUENCODE(NEWTOY(uuencode, "<1>2m", TOYFLAG_USR|TOYFLAG_BIN))
 USE_VCONFIG(NEWTOY(vconfig, "<2>4", TOYFLAG_NEEDROOT|TOYFLAG_SBIN))
+USE_VI(NEWTOY(vi, "<1>1", TOYFLAG_USR|TOYFLAG_BIN))
 USE_VMSTAT(NEWTOY(vmstat, ">2n", TOYFLAG_BIN))
 USE_W(NEWTOY(w, NULL, TOYFLAG_USR|TOYFLAG_BIN))
 USE_WATCH(NEWTOY(watch, "^<1n#<0=2te", TOYFLAG_USR|TOYFLAG_BIN))
diff --git a/generated/tags.h b/generated/tags.h
new file mode 100644 (file)
index 0000000..f2cfcf6
--- /dev/null
@@ -0,0 +1,156 @@
+#define CP_mode                                     0
+#define _CP_mode                                    (1<<0)
+#define CP_ownership                                1
+#define _CP_ownership                               (1<<1)
+#define CP_timestamps                               2
+#define _CP_timestamps                              (1<<2)
+#define CP_context                                  3
+#define _CP_context                                 (1<<3)
+#define CP_xattr                                    4
+#define _CP_xattr                                   (1<<4)
+#define PS_PID                                      0
+#define _PS_PID                                     (1<<0)
+#define PS_PPID                                     1
+#define _PS_PPID                                    (1<<1)
+#define PS_PRI                                      2
+#define _PS_PRI                                     (1<<2)
+#define PS_NI                                       3
+#define _PS_NI                                      (1<<3)
+#define PS_ADDR                                     4
+#define _PS_ADDR                                    (1<<4)
+#define PS_SZ                                       5
+#define _PS_SZ                                      (1<<5)
+#define PS_RSS                                      6
+#define _PS_RSS                                     (1<<6)
+#define PS_PGID                                     7
+#define _PS_PGID                                    (1<<7)
+#define PS_VSZ                                      8
+#define _PS_VSZ                                     (1<<8)
+#define PS_MAJFL                                    9
+#define _PS_MAJFL                                   (1<<9)
+#define PS_MINFL                                    10
+#define _PS_MINFL                                   (1<<10)
+#define PS_PR                                       11
+#define _PS_PR                                      (1<<11)
+#define PS_PSR                                      12
+#define _PS_PSR                                     (1<<12)
+#define PS_RTPRIO                                   13
+#define _PS_RTPRIO                                  (1<<13)
+#define PS_SCH                                      14
+#define _PS_SCH                                     (1<<14)
+#define PS_UID                                      15
+#define _PS_UID                                     (1<<15)
+#define PS_USER                                     16
+#define _PS_USER                                    (1<<16)
+#define PS_RUID                                     17
+#define _PS_RUID                                    (1<<17)
+#define PS_RUSER                                    18
+#define _PS_RUSER                                   (1<<18)
+#define PS_GID                                      19
+#define _PS_GID                                     (1<<19)
+#define PS_GROUP                                    20
+#define _PS_GROUP                                   (1<<20)
+#define PS_RGID                                     21
+#define _PS_RGID                                    (1<<21)
+#define PS_RGROUP                                   22
+#define _PS_RGROUP                                  (1<<22)
+#define PS_COMM                                     23
+#define _PS_COMM                                    (1<<23)
+#define PS_TTY                                      24
+#define _PS_TTY                                     (1<<24)
+#define PS_WCHAN                                    25
+#define _PS_WCHAN                                   (1<<25)
+#define PS_LABEL                                    26
+#define _PS_LABEL                                   (1<<26)
+#define PS_COMMAND                                  27
+#define _PS_COMMAND                                 (1<<27)
+#define PS_CMDLINE                                  28
+#define _PS_CMDLINE                                 (1<<28)
+#define PS_ARGS                                     29
+#define _PS_ARGS                                    (1<<29)
+#define PS_NAME                                     30
+#define _PS_NAME                                    (1<<30)
+#define PS_CMD                                      31
+#define _PS_CMD                                     (1<<31)
+#define PS_TIME                                     32
+#define _PS_TIME                                    (1LL<<32)
+#define PS_ELAPSED                                  33
+#define _PS_ELAPSED                                 (1LL<<33)
+#define PS_TIME_                                    34
+#define _PS_TIME_                                   (1LL<<34)
+#define PS_STIME                                    35
+#define _PS_STIME                                   (1LL<<35)
+#define PS_F                                        36
+#define _PS_F                                       (1LL<<36)
+#define PS_S                                        37
+#define _PS_S                                       (1LL<<37)
+#define PS_C                                        38
+#define _PS_C                                       (1LL<<38)
+#define PS__CPU                                     39
+#define _PS__CPU                                    (1LL<<39)
+#define PS_STAT                                     40
+#define _PS_STAT                                    (1LL<<40)
+#define PS__VSZ                                     41
+#define _PS__VSZ                                    (1LL<<41)
+#define PS_VIRT                                     42
+#define _PS_VIRT                                    (1LL<<42)
+#define PS_RES                                      43
+#define _PS_RES                                     (1LL<<43)
+#define PS_SHR                                      44
+#define _PS_SHR                                     (1LL<<44)
+#define PS_READ                                     45
+#define _PS_READ                                    (1LL<<45)
+#define PS_WRITE                                    46
+#define _PS_WRITE                                   (1LL<<46)
+#define PS_IO                                       47
+#define _PS_IO                                      (1LL<<47)
+#define PS_DREAD                                    48
+#define _PS_DREAD                                   (1LL<<48)
+#define PS_DWRITE                                   49
+#define _PS_DWRITE                                  (1LL<<49)
+#define PS_SWAP                                     50
+#define _PS_SWAP                                    (1LL<<50)
+#define PS_DIO                                      51
+#define _PS_DIO                                     (1LL<<51)
+#define KEY_UP                                       0
+#define _KEY_UP                                      (1<<0)
+#define KEY_DOWN                                     1
+#define _KEY_DOWN                                    (1<<1)
+#define KEY_RIGHT                                    2
+#define _KEY_RIGHT                                   (1<<2)
+#define KEY_LEFT                                     3
+#define _KEY_LEFT                                    (1<<3)
+#define KEY_PGUP                                     4
+#define _KEY_PGUP                                    (1<<4)
+#define KEY_PGDN                                     5
+#define _KEY_PGDN                                    (1<<5)
+#define KEY_HOME                                     6
+#define _KEY_HOME                                    (1<<6)
+#define KEY_END                                      7
+#define _KEY_END                                     (1<<7)
+#define KEY_INSERT                                   8
+#define _KEY_INSERT                                  (1<<8)
+#define KEY_SUP                                      9
+#define _KEY_SUP                                     (1<<9)
+#define KEY_AUP                                      10
+#define _KEY_AUP                                     (1<<10)
+#define KEY_CUP                                      11
+#define _KEY_CUP                                     (1<<11)
+#define KEY_SDOWN                                    12
+#define _KEY_SDOWN                                   (1<<12)
+#define KEY_ADOWN                                    13
+#define _KEY_ADOWN                                   (1<<13)
+#define KEY_CDOWN                                    14
+#define _KEY_CDOWN                                   (1<<14)
+#define KEY_SRIGHT                                   15
+#define _KEY_SRIGHT                                  (1<<15)
+#define KEY_ARIGHT                                   16
+#define _KEY_ARIGHT                                  (1<<16)
+#define KEY_CRIGHT                                   17
+#define _KEY_CRIGHT                                  (1<<17)
+#define KEY_SLEFT                                    18
+#define _KEY_SLEFT                                   (1<<18)
+#define KEY_ALEFT                                    19
+#define _KEY_ALEFT                                   (1<<19)
+#define KEY_CLEFT                                    20
+#define _KEY_CLEFT                                   (1<<20)