From 0cad3b1b0742168cc6d6c342b566e660d009e5b8 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Tue, 6 Oct 2015 14:31:35 -0700 Subject: [PATCH] Regenerate generated files (and build flock). Change-Id: Ia7a11e6a130f4b043842d54d86c9bb02f7ee6270 --- .config | 1 + Android.mk | 2 ++ generated/config.h | 2 ++ generated/flags.h | 22 ++++++++++++++++++++++ generated/globals.h | 12 +++--------- generated/help.h | 10 +++++++--- generated/newtoys.h | 3 +++ 7 files changed, 40 insertions(+), 12 deletions(-) diff --git a/.config b/.config index 5fa63a5e..3e13c023 100644 --- a/.config +++ b/.config @@ -203,6 +203,7 @@ CONFIG_UNIX2DOS=y # CONFIG_EJECT is not set # CONFIG_FACTOR is not set CONFIG_FALLOCATE=y +CONFIG_FLOCK=y CONFIG_FREE=y CONFIG_FREERAMDISK=y CONFIG_FSFREEZE=y diff --git a/Android.mk b/Android.mk index 4cc49c14..bf722ac0 100644 --- a/Android.mk +++ b/Android.mk @@ -86,6 +86,7 @@ LOCAL_SRC_FILES := \ toys/other/clear.c \ toys/other/dos2unix.c \ toys/other/fallocate.c \ + toys/other/flock.c \ toys/other/free.c \ toys/other/freeramdisk.c \ toys/other/fsfreeze.c \ @@ -261,6 +262,7 @@ ALL_TOOLS := \ fallocate \ false \ find \ + flock \ free \ getenforce \ getprop \ diff --git a/generated/config.h b/generated/config.h index 8d3d21bd..ae22ecec 100644 --- a/generated/config.h +++ b/generated/config.h @@ -376,6 +376,8 @@ #define USE_FACTOR(...) #define CFG_FALLOCATE 1 #define USE_FALLOCATE(...) __VA_ARGS__ +#define CFG_FLOCK 1 +#define USE_FLOCK(...) __VA_ARGS__ #define CFG_FREE 1 #define USE_FREE(...) __VA_ARGS__ #define CFG_FREERAMDISK 1 diff --git a/generated/flags.h b/generated/flags.h index f7559cce..3230b1ca 100644 --- a/generated/flags.h +++ b/generated/flags.h @@ -677,6 +677,18 @@ #undef FLAG_H #endif +// flock <1>1nsux[-sux] <1>1nsux[-sux] +#undef OPTSTR_flock +#define OPTSTR_flock "<1>1nsux[-sux]" +#ifdef CLEANUP_flock +#undef CLEANUP_flock +#undef FOR_flock +#undef FLAG_x +#undef FLAG_u +#undef FLAG_s +#undef FLAG_n +#endif + // fold bsuw#<1 #undef OPTSTR_fold #define OPTSTR_fold 0 @@ -3367,6 +3379,16 @@ #define FLAG_H (1<<1) #endif +#ifdef FOR_flock +#ifndef TT +#define TT this.flock +#endif +#define FLAG_x (1<<0) +#define FLAG_u (1<<1) +#define FLAG_s (1<<2) +#define FLAG_n (1<<3) +#endif + #ifdef FOR_fold #ifndef TT #define TT this.fold diff --git a/generated/globals.h b/generated/globals.h index e641695d..1ad4812d 100644 --- a/generated/globals.h +++ b/generated/globals.h @@ -368,15 +368,9 @@ struct arping_data { char *src_ip; int sockfd; - unsigned start; - unsigned end; - unsigned sent_at; - unsigned sent_nr; - unsigned rcvd_nr; - unsigned brd_sent; - unsigned rcvd_req; - unsigned brd_rcv; - unsigned unicast_flag; + unsigned long start, end; + unsigned sent_at, sent_nr, rcvd_nr, brd_sent, rcvd_req, brd_rcv, + unicast_flag; }; // toys/pending/bootchartd.c diff --git a/generated/help.h b/generated/help.h index f09b51f0..e08ce027 100644 --- a/generated/help.h +++ b/generated/help.h @@ -106,7 +106,7 @@ #define help_tac "usage: tac [FILE...]\n\nOutput lines in reverse order.\n\n" -#define help_sysctl "usage: sysctl [-aAeNnqw] [-p [FILE] | KEY[=VALUE]...]\n\nRead/write system control data (under /proc/sys).\n\n-a,A Show all values\n-e Don't warn about unknown keys\n-N Don't print key values\n-n Don't print key names\n-p [FILE] Read values from FILE (default /etc/sysctl.conf)\n-q Don't show value after write\n-w Only write values (object to reading)\n\n" +#define help_sysctl "usage: sysctl [-aAeNnqw] [-p [FILE] | KEY[=VALUE]...]\n\nRead/write system control data (under /proc/sys).\n\n-a,A Show all values\n-e Don't warn about unknown keys\n-N Don't print key values\n-n Don't print key names\n-p Read values from FILE (default /etc/sysctl.conf)\n-q Don't show value after write\n-w Only write values (object to reading)\n\n" #define help_switch_root "usage: switch_root [-c /dev/console] NEW_ROOT NEW_INIT...\n\nUse from PID 1 under initramfs to free initramfs, chroot to NEW_ROOT,\nand exec NEW_INIT.\n\n-c Redirect console to device in NEW_ROOT\n-h Hang instead of exiting on failure (avoids kernel panic)\n\n" @@ -152,7 +152,9 @@ #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_netcat_listen_tty "usage: netcat [-t]\n\n-t allocate tty (must come before -l or -L)\n\n" + +#define help_netcat "usage: netcat [-lL COMMAND...] [-u] [-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-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_nbd_client "usage: nbd-client [-ns] HOST PORT DEVICE\n\n-n Do not fork into background\n-s nbd swap support (lock server into memory)\n\n" @@ -210,6 +212,8 @@ #define help_free "usage: free [-bkmgt]\n\nDisplay the total, free and used amount of physical memory and swap space.\n\n-bkmgt Output units (default is bytes)\n\n" +#define help_flock "usage: flock [-sxun] fd\n\nManage advisory file locks.\n\n-s Shared lock.\n-x Exclusive lock (default).\n-u Unlock.\n-n Non-blocking: fail rather than wait for the lock.\n\n" + #define help_fallocate "usage: fallocate [-l size] file\n\nTell the filesystem to allocate space for a file.\n\n" #define help_factor "usage: factor NUMBER...\n\nFactor integers.\n\n" @@ -310,7 +314,7 @@ #define help_mke2fs "usage: mke2fs [-Fnq] [-b ###] [-N|i ###] [-m ###] device\n\nCreate an ext2 filesystem on a block device or filesystem image.\n\n-F Force to run on a mounted device\n-n Don't write to device\n-q Quiet (no output)\n-b size Block size (1024, 2048, or 4096)\n-N inodes Allocate this many inodes\n-i bytes Allocate one inode for every XXX bytes of device\n-m percent Reserve this percent of filesystem space for root user\n\n" -#define help_mdev_conf "The mdev config file (/etc/mdev.conf) contains lines that look like:\nhd[a-z][0-9]* 0:3 660\n\nEach line must contain three whitespace separated fields. The first\nfield is a regular expression matching one or more device names, and\nthe second and third fields are uid:gid and file permissions for\nmatching devies.\n\n" +#define help_mdev_conf "The mdev config file (/etc/mdev.conf) contains lines that look like:\nhd[a-z][0-9]* 0:3 660\n\nEach line must contain three whitespace separated fields. The first\nfield is a regular expression matching one or more device names,\nthe second and third fields are uid:gid and file permissions for\nmatching devies.\n\n" #define help_mdev "usage: mdev [-s]\n\nCreate devices in /dev using information from /sys.\n\n-s Scan all entries in /sys to populate /dev.\n\n" diff --git a/generated/newtoys.h b/generated/newtoys.h index c295c5d5..7fe570a2 100644 --- a/generated/newtoys.h +++ b/generated/newtoys.h @@ -1,4 +1,6 @@ USE_TOYBOX(NEWTOY(toybox, NULL, TOYFLAG_STAYROOT)) +USE_SH(OLDTOY(-sh, sh, 0)) +USE_SH(OLDTOY(-toysh, sh, 0)) USE_TRUE(OLDTOY(:, true, TOYFLAG_NOFORK)) USE_ACPI(NEWTOY(acpi, "abctV", TOYFLAG_USR|TOYFLAG_BIN)) USE_GROUPADD(OLDTOY(addgroup, groupadd, TOYFLAG_NEEDROOT|TOYFLAG_SBIN)) @@ -62,6 +64,7 @@ USE_FALSE(NEWTOY(false, NULL, TOYFLAG_BIN)) USE_FDISK(NEWTOY(fdisk, "C#<0H#<0S#<0b#<512ul", TOYFLAG_SBIN)) USE_FGREP(OLDTOY(fgrep, grep, TOYFLAG_BIN)) USE_FIND(NEWTOY(find, "?^HL[-HL]", TOYFLAG_USR|TOYFLAG_BIN)) +USE_FLOCK(NEWTOY(flock, "<1>1nsux[-sux]", TOYFLAG_USR|TOYFLAG_BIN)) USE_FOLD(NEWTOY(fold, "bsuw#<1", TOYFLAG_USR|TOYFLAG_BIN)) USE_FREE(NEWTOY(free, "tgmkb[!tgmkb]", TOYFLAG_USR|TOYFLAG_BIN)) USE_FREERAMDISK(NEWTOY(freeramdisk, "<1>1", TOYFLAG_SBIN|TOYFLAG_NEEDROOT)) -- 2.11.0