OSDN Git Service

Merge remote-tracking branch 'toybox/master' into HEAD
[android-x86/external-toybox.git] / generated / globals.h
index 607cd31..8a9be04 100644 (file)
@@ -3,6 +3,14 @@
 struct getprop_data {
   size_t size;
   char **nv; // name/value pairs: even=name, odd=value
+  struct selabel_handle *handle;
+};
+
+// toys/android/log.c
+
+struct log_data {
+  char *tag;
+  char *pri;
 };
 
 // toys/example/hello.c
@@ -38,6 +46,12 @@ struct dmesg_data {
   long size;
 };
 
+// toys/lsb/hostname.c
+
+struct hostname_data {
+  char *fname;
+};
+
 // toys/lsb/killall.c
 
 struct killall_data {
@@ -52,6 +66,11 @@ struct killall_data {
 // toys/lsb/md5sum.c
 
 struct md5sum_data {
+  struct arg_list *c;
+
+  int sawline;
+
+  // Crypto variables blanked after summing
   unsigned state[5];
   unsigned oldstate[5];
   uint64_t count;
@@ -120,6 +139,29 @@ struct umount_data {
   char *types;
 };
 
+// toys/net/ifconfig.c
+
+struct ifconfig_data {
+  int sockfd;
+};
+
+// toys/net/netcat.c
+
+struct netcat_data {
+  char *filename;        // -f read from filename instead of network
+  long quit_delay;       // -q Exit after EOF from stdin after # seconds.
+  char *source_address;  // -s Bind to a specific source address.
+  long port;             // -p Bind to a specific source port.
+  long wait;             // -w Wait # seconds for a connection.
+};
+
+// toys/net/netstat.c
+
+struct netstat_data {
+  struct num_cache *inodes;
+  int wpad;
+};;
+
 // toys/other/acpi.c
 
 struct acpi_data {
@@ -131,6 +173,8 @@ struct acpi_data {
 
 struct base64_data {
   long columns;
+
+  unsigned total;
 };
 
 // toys/other/blockdev.c
@@ -156,6 +200,7 @@ struct fallocate_data {
 struct free_data {
   unsigned bits;
   unsigned long long units;
+  char *buf;
 };
 
 // toys/other/hexedit.c
@@ -175,12 +220,6 @@ struct hwclock_data {
   int utc;
 };
 
-// toys/other/ifconfig.c
-
-struct ifconfig_data {
-  int sockfd;
-};
-
 // toys/other/ionice.c
 
 struct ionice_data {
@@ -242,6 +281,12 @@ struct mkpasswd_data {
   char *salt;
 };
 
+// toys/other/mkswap.c
+
+struct mkswap_data {
+  char *L;
+};
+
 // toys/other/modinfo.c
 
 struct modinfo_data {
@@ -252,16 +297,6 @@ struct modinfo_data {
   long mod;
 };
 
-// toys/other/netcat.c
-
-struct netcat_data {
-  char *filename;        // -f read from filename instead of network
-  long quit_delay;       // -q Exit after EOF from stdin after # seconds.
-  char *source_address;  // -s Bind to a specific source address.
-  long port;             // -p Bind to a specific source port.
-  long wait;             // -w Wait # seconds for a connection.
-};
-
 // toys/other/nsenter.c
 
 struct nsenter_data {
@@ -275,6 +310,12 @@ struct oneit_data {
   char *console;
 };
 
+// toys/other/setfattr.c
+
+struct setfattr_data {
+  char *x, *v, *n;
+};
+
 // toys/other/shred.c
 
 struct shred_data {
@@ -294,8 +335,8 @@ struct stat_data {
     struct stat st;
     struct statfs sf;
   } stat;
-  struct passwd *user_name;
-  struct group *group_name;
+  char *file, *pattern;
+  int patlen;
 };
 
 // toys/other/swapon.c
@@ -312,12 +353,6 @@ struct switch_root_data {
   dev_t rootdev;
 };
 
-// toys/other/taskset.c
-
-struct taskset_data {
-  int nproc;
-};
-
 // toys/other/timeout.c
 
 struct timeout_data {
@@ -342,6 +377,7 @@ struct truncate_data {
 // toys/other/xxd.c
 
 struct xxd_data {
+  long s;
   long g;
   long l;
   long c;
@@ -368,15 +404,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
@@ -439,8 +469,18 @@ struct crontab_data {
 // toys/pending/dd.c
 
 struct dd_data {
-  int sig;
-};
+  int show_xfer;
+  int show_records;
+  unsigned long long bytes, c_count, in_full, in_part, out_full, out_part;
+  struct timeval start;
+  struct {
+    char *name;
+    int fd;
+    unsigned char *buff, *bp;
+    long sz, count;
+    unsigned long long offset;
+  } in, out;
+};;
 
 // toys/pending/dhcp.c
 
@@ -459,6 +499,18 @@ struct dhcp_data {
     char *vendor_cls;
 };
 
+// toys/pending/dhcp6.c
+
+struct dhcp6_data {
+  char *interface_name, *pidfile, *script;
+  long retry, timeout, errortimeout;
+  char *req_ip;
+  int length, state, request_length, sock, sock1, status, retval, retries;
+  struct timeval tv;
+  uint8_t transction_id[3];
+  struct sockaddr_in6 input_socket6;
+};
+
 // toys/pending/dhcpd.c
 
 struct dhcpd_data {
@@ -486,7 +538,9 @@ struct dumpleases_data {
 // toys/pending/expr.c
 
 struct expr_data {
-  int argidx;
+  char **tok; // current token, not on the stack since recursive calls mutate it
+
+  char *refree;
 };
 
 // toys/pending/fdisk.c
@@ -533,6 +587,12 @@ struct ftpget_data {
   char buf[sizeof(struct sockaddr_storage)];
 };
 
+// toys/pending/getfattr.c
+
+struct getfattr_data {
+  char *n;
+};
+
 // toys/pending/getty.c
 
 struct getty_data {
@@ -618,6 +678,19 @@ struct logger_data {
   char *ident;
 };
 
+// toys/pending/lsof.c
+
+struct lsof_data {
+  struct arg_list *p;
+
+  struct stat *sought_files;
+
+  struct double_list *all_sockets;
+  struct double_list *files;
+  int last_shown_pid;
+  int shown_header;
+};
+
 // toys/pending/mke2fs.c
 
 struct mke2fs_data {
@@ -671,14 +744,6 @@ struct openvt_data {
   unsigned long vt_num;
 };
 
-// toys/pending/pgrep.c
-
-struct pgrep_data {
-  long sid;       //-s
-  long ppid;      //-P
-  char *signame;
-};
-
 // toys/pending/ping.c
 
 struct ping_data {
@@ -692,17 +757,6 @@ struct ping_data {
   int sock;
 };
 
-// toys/pending/ps.c
-
-struct ps_data {
-  struct arg_list *o;
-
-  unsigned width;
-  dev_t tty;
-  void *fields;
-  long uptime;
-};
-
 // toys/pending/route.c
 
 struct route_data {
@@ -713,6 +767,8 @@ struct route_data {
 
 struct sh_data {
   char *command;
+
+  long lineno;
 };
 
 // toys/pending/sulogin.c
@@ -820,23 +876,6 @@ struct tftpd_data {
   struct passwd *pw;
 };
 
-// toys/pending/top.c
-
-struct top_data {
-  long iterations;
-  long delay;
-
-  long cmp_field;
-  long reverse;
-  long rows;
-  long smp;
-  long threads;
-  long m_flag;
-  long num_new_procs;
-  long scroll_offset;
-  struct termios inf;
-};
-
 // toys/pending/tr.c
 
 struct tr_data {
@@ -879,12 +918,25 @@ struct useradd_data {
   long gid;
 };
 
+// toys/pending/vi.c
+
+struct vi_data {
+  struct linestack *ls;
+  char *statline;
+};
+
 // toys/pending/watch.c
 
 struct watch_data {
   int interval;
 };
 
+// toys/pending/wget.c
+
+struct wget_data {
+  char *filename;
+};
+
 // toys/posix/chgrp.c
 
 struct chgrp_data {
@@ -974,6 +1026,8 @@ struct df_data {
   struct arg_list *fstype;
 
   long units;
+  int column_widths[5];
+  int header_shown;
 };
 
 // toys/posix/du.c
@@ -986,6 +1040,12 @@ struct du_data {
   void *inodes;
 };
 
+// toys/posix/env.c
+
+struct env_data {
+  struct arg_list *u;
+};;
+
 // toys/posix/expand.c
 
 struct expand_data {
@@ -994,12 +1054,18 @@ struct expand_data {
   unsigned tabcount, *tab;
 };
 
+// toys/posix/file.c
+
+struct file_data {
+  int max_name_len;
+};
+
 // toys/posix/find.c
 
 struct find_data {
   char **filter;
   struct double_list *argdata;
-  int topdir, xdev, depth, envsize;
+  int topdir, xdev, depth;
   time_t now;
 };
 
@@ -1009,8 +1075,11 @@ struct grep_data {
   long m;
   struct arg_list *f;
   struct arg_list *e;
+  long a;
+  long b;
+  long c;
 
-  struct arg_list *regex;
+  char indelim, outdelim;
 };
 
 // toys/posix/head.c
@@ -1042,7 +1111,7 @@ struct ls_data {
 
   unsigned screen_width;
   int nl_title;
-  char uid_buf[12], gid_buf[12];
+  char *escmore;
 };
 
 // toys/posix/mkdir.c
@@ -1087,12 +1156,13 @@ struct od_data {
   struct arg_list *output_base;
   char *address_base;
   long max_count;
+  long width;
   long jump_bytes;
 
   int address_idx;
   unsigned types, leftover, star;
-  char *buf;
-  uint64_t bufs[4]; // force 64-bit alignment
+  char *buf; // Points to buffers[0] or buffers[1].
+  char *bufs[2]; // Used to detect duplicate lines.
   off_t pos;
 };
 
@@ -1107,6 +1177,7 @@ struct paste_data {
 struct patch_data {
   char *infile;
   long prefix;
+  char *dir;
 
   struct double_list *current_hunk;
   long oldline, oldlen, newline, newlen;
@@ -1115,6 +1186,62 @@ struct patch_data {
   char *tempname;
 };
 
+// toys/posix/ps.c
+
+struct ps_data {
+  union {
+    struct {
+      struct arg_list *G;
+      struct arg_list *g;
+      struct arg_list *U;
+      struct arg_list *u;
+      struct arg_list *t;
+      struct arg_list *s;
+      struct arg_list *p;
+      struct arg_list *O;
+      struct arg_list *o;
+      struct arg_list *P;
+      struct arg_list *k;
+    } ps;
+    struct {
+      long n;
+      long d;
+      long s;
+      struct arg_list *u;
+      struct arg_list *p;
+      struct arg_list *o;
+      struct arg_list *k;
+      struct arg_list *O;
+    } top;
+    struct {
+      char *L;
+      struct arg_list *G;
+      struct arg_list *g;
+      struct arg_list *P;
+      struct arg_list *s;
+      struct arg_list *t;
+      struct arg_list *U;
+      struct arg_list *u;
+      char *d;
+
+      void *regexes, *snapshot;
+      int signal;
+      pid_t self, match;
+    } pgrep;
+  };
+
+  struct sysinfo si;
+  struct ptr_len gg, GG, pp, PP, ss, tt, uu, UU;
+  struct dirtree *threadparent;
+  unsigned width, height;
+  dev_t tty;
+  void *fields, *kfields;
+  long long ticks, bits, time;
+  int kcount, forcek, sortpos;
+  int (*match_process)(long long *slot);
+  void (*show_process)(void *tb);
+};
+
 // toys/posix/renice.c
 
 struct renice_data {
@@ -1172,7 +1299,7 @@ struct tail_data {
   long lines;
   long bytes;
 
-  int file_no;
+  int file_no, ffd, *files;
 };
 
 // toys/posix/tee.c
@@ -1189,6 +1316,12 @@ struct touch_data {
   char *date;
 };
 
+// toys/posix/ulimit.c
+
+struct ulimit_data {
+  long pid;
+};
+
 // toys/posix/uniq.c
 
 struct uniq_data {
@@ -1207,7 +1340,7 @@ struct uudecode_data {
 // toys/posix/wc.c
 
 struct wc_data {
-  unsigned long totals[3];
+  unsigned long totals[4];
 };
 
 // toys/posix/xargs.c
@@ -1225,9 +1358,11 @@ struct xargs_data {
 
 extern union global_union {
        struct getprop_data getprop;
+       struct log_data log;
        struct hello_data hello;
        struct skeleton_data skeleton;
        struct dmesg_data dmesg;
+       struct hostname_data hostname;
        struct killall_data killall;
        struct md5sum_data md5sum;
        struct mknod_data mknod;
@@ -1238,6 +1373,9 @@ extern union global_union {
        struct seq_data seq;
        struct su_data su;
        struct umount_data umount;
+       struct ifconfig_data ifconfig;
+       struct netcat_data netcat;
+       struct netstat_data netstat;
        struct acpi_data acpi;
        struct base64_data base64;
        struct blockdev_data blockdev;
@@ -1246,7 +1384,6 @@ extern union global_union {
        struct free_data free;
        struct hexedit_data hexedit;
        struct hwclock_data hwclock;
-       struct ifconfig_data ifconfig;
        struct ionice_data ionice;
        struct login_data login;
        struct losetup_data losetup;
@@ -1254,15 +1391,15 @@ extern union global_union {
        struct makedevs_data makedevs;
        struct mix_data mix;
        struct mkpasswd_data mkpasswd;
+       struct mkswap_data mkswap;
        struct modinfo_data modinfo;
-       struct netcat_data netcat;
        struct nsenter_data nsenter;
        struct oneit_data oneit;
+       struct setfattr_data setfattr;
        struct shred_data shred;
        struct stat_data stat;
        struct swapon_data swapon;
        struct switch_root_data switch_root;
-       struct taskset_data taskset;
        struct timeout_data timeout;
        struct truncate_data truncate;
        struct xxd_data xxd;
@@ -1275,6 +1412,7 @@ extern union global_union {
        struct crontab_data crontab;
        struct dd_data dd;
        struct dhcp_data dhcp;
+       struct dhcp6_data dhcp6;
        struct dhcpd_data dhcpd;
        struct diff_data diff;
        struct dumpleases_data dumpleases;
@@ -1283,6 +1421,7 @@ extern union global_union {
        struct fold_data fold;
        struct fsck_data fsck;
        struct ftpget_data ftpget;
+       struct getfattr_data getfattr;
        struct getty_data getty;
        struct groupadd_data groupadd;
        struct host_data host;
@@ -1293,13 +1432,12 @@ extern union global_union {
        struct klogd_data klogd;
        struct last_data last;
        struct logger_data logger;
+       struct lsof_data lsof;
        struct mke2fs_data mke2fs;
        struct modprobe_data modprobe;
        struct more_data more;
        struct openvt_data openvt;
-       struct pgrep_data pgrep;
        struct ping_data ping;
-       struct ps_data ps;
        struct route_data route;
        struct sh_data sh;
        struct sulogin_data sulogin;
@@ -1310,11 +1448,12 @@ extern union global_union {
        struct telnetd_data telnetd;
        struct tftp_data tftp;
        struct tftpd_data tftpd;
-       struct top_data top;
        struct tr_data tr;
        struct traceroute_data traceroute;
        struct useradd_data useradd;
+       struct vi_data vi;
        struct watch_data watch;
+       struct wget_data wget;
        struct chgrp_data chgrp;
        struct chmod_data chmod;
        struct cksum_data cksum;
@@ -1325,7 +1464,9 @@ extern union global_union {
        struct date_data date;
        struct df_data df;
        struct du_data du;
+       struct env_data env;
        struct expand_data expand;
+       struct file_data file;
        struct find_data find;
        struct grep_data grep;
        struct head_data head;
@@ -1339,6 +1480,7 @@ extern union global_union {
        struct od_data od;
        struct paste_data paste;
        struct patch_data patch;
+       struct ps_data ps;
        struct renice_data renice;
        struct sed_data sed;
        struct sort_data sort;
@@ -1347,6 +1489,7 @@ extern union global_union {
        struct tail_data tail;
        struct tee_data tee;
        struct touch_data touch;
+       struct ulimit_data ulimit;
        struct uniq_data uniq;
        struct uudecode_data uudecode;
        struct wc_data wc;