Home | History | Annotate | Download | only in generated
      1 // toys/android/getprop.c
      2 
      3 struct getprop_data {
      4   size_t size;
      5   char **nv; // name/value pairs: even=name, odd=value
      6   struct selabel_handle *handle;
      7 };
      8 
      9 // toys/android/log.c
     10 
     11 struct log_data {
     12   char *tag;
     13   char *pri;
     14 };
     15 
     16 // toys/example/hello.c
     17 
     18 struct hello_data {
     19   int unused;
     20 };
     21 
     22 // toys/example/skeleton.c
     23 
     24 struct skeleton_data {
     25   union {
     26     struct {
     27       char *b_string;
     28       long c_number;
     29       struct arg_list *d_list;
     30       long e_count;
     31       char *also_string;
     32       char *blubber_string;
     33     } s;
     34     struct {
     35       long b_number;
     36     } a;
     37   };
     38 
     39   int more_globals;
     40 };
     41 
     42 // toys/lsb/hostname.c
     43 
     44 struct hostname_data {
     45   char *fname;
     46 };
     47 
     48 // toys/lsb/killall.c
     49 
     50 struct killall_data {
     51   char *sig;
     52 
     53   int signum;
     54   pid_t cur_pid;
     55   char **names;
     56   short *err;
     57 };
     58 
     59 // toys/lsb/md5sum.c
     60 
     61 struct md5sum_data {
     62   struct arg_list *c;
     63 
     64   int sawline;
     65 
     66   // Crypto variables blanked after summing
     67   unsigned state[5];
     68   unsigned oldstate[5];
     69   uint64_t count;
     70   union {
     71     char c[64];
     72     unsigned i[16];
     73   } buffer;
     74 };
     75 
     76 // toys/lsb/mknod.c
     77 
     78 struct mknod_data {
     79   char *arg_context;
     80   char *m;
     81 };
     82 
     83 // toys/lsb/mktemp.c
     84 
     85 struct mktemp_data {
     86   char *tmpdir;
     87 };
     88 
     89 // toys/lsb/mount.c
     90 
     91 struct mount_data {
     92   struct arg_list *optlist;
     93   char *type;
     94   char *bigO;
     95 
     96   unsigned long flags;
     97   char *opts;
     98   int okuser;
     99 };
    100 
    101 // toys/lsb/passwd.c
    102 
    103 struct passwd_data {
    104   char *algo;
    105 };
    106 
    107 // toys/lsb/pidof.c
    108 
    109 struct pidof_data {
    110   char *omit;
    111 };
    112 
    113 // toys/lsb/seq.c
    114 
    115 struct seq_data {
    116   char *sep;
    117   char *fmt;
    118 };
    119 
    120 // toys/lsb/su.c
    121 
    122 struct su_data {
    123   char *s;
    124   char *c;
    125 };
    126 
    127 // toys/lsb/umount.c
    128 
    129 struct umount_data {
    130   struct arg_list *t;
    131 
    132   char *types;
    133 };
    134 
    135 // toys/net/ftpget.c
    136 
    137 struct ftpget_data {
    138   char *user;
    139   char *port;
    140   char *password;
    141 
    142   int fd;
    143 };
    144 
    145 // toys/net/ifconfig.c
    146 
    147 struct ifconfig_data {
    148   int sockfd;
    149 };
    150 
    151 // toys/net/microcom.c
    152 
    153 struct microcom_data {
    154   char *s;
    155 
    156   int fd;
    157   struct termios original_stdin_state, original_fd_state;
    158 };
    159 
    160 // toys/net/netcat.c
    161 
    162 struct netcat_data {
    163   char *filename;        // -f read from filename instead of network
    164   long quit_delay;       // -q Exit after EOF from stdin after # seconds.
    165   char *source_address;  // -s Bind to a specific source address.
    166   long port;             // -p Bind to a specific source port.
    167   long idle;             // -W Wait # seconds for more data
    168   long wait;             // -w Wait # seconds for a connection.
    169 };
    170 
    171 // toys/net/netstat.c
    172 
    173 struct netstat_data {
    174   struct num_cache *inodes;
    175   int wpad;
    176 };;
    177 
    178 // toys/net/tunctl.c
    179 
    180 struct tunctl_data {
    181   char *user;
    182 };
    183 
    184 // toys/other/acpi.c
    185 
    186 struct acpi_data {
    187   int ac, bat, therm, cool;
    188   char *cpath;
    189 };
    190 
    191 // toys/other/base64.c
    192 
    193 struct base64_data {
    194   long columns;
    195 
    196   unsigned total;
    197 };
    198 
    199 // toys/other/blockdev.c
    200 
    201 struct blockdev_data {
    202   long bsz;
    203 };
    204 
    205 // toys/other/dos2unix.c
    206 
    207 struct dos2unix_data {
    208   char *tempfile;
    209 };
    210 
    211 // toys/other/fallocate.c
    212 
    213 struct fallocate_data {
    214   long offset;
    215   long size;
    216 };
    217 
    218 // toys/other/free.c
    219 
    220 struct free_data {
    221   unsigned bits;
    222   unsigned long long units;
    223   char *buf;
    224 };
    225 
    226 // toys/other/hexedit.c
    227 
    228 struct hexedit_data {
    229   char *data;
    230   long long len, base;
    231   int numlen, undo, undolen;
    232   unsigned height;
    233 };
    234 
    235 // toys/other/hwclock.c
    236 
    237 struct hwclock_data {
    238   char *fname;
    239 
    240   int utc;
    241 };
    242 
    243 // toys/other/ionice.c
    244 
    245 struct ionice_data {
    246   long pid;
    247   long level;
    248   long class;
    249 };
    250 
    251 // toys/other/login.c
    252 
    253 struct login_data {
    254   char *hostname;
    255   char *username;
    256 
    257   int login_timeout, login_fail_timeout;
    258 };
    259 
    260 // toys/other/losetup.c
    261 
    262 struct losetup_data {
    263   char *jfile;
    264   long offset;
    265   long size;
    266 
    267   int openflags;
    268   dev_t jdev;
    269   ino_t jino;
    270 };
    271 
    272 // toys/other/lspci.c
    273 
    274 struct lspci_data {
    275   char *ids;
    276   long numeric;
    277 
    278   FILE *db;
    279 };
    280 
    281 // toys/other/makedevs.c
    282 
    283 struct makedevs_data {
    284   char *fname;
    285 };
    286 
    287 // toys/other/mix.c
    288 
    289 struct mix_data {
    290    long right;
    291    long level;
    292    char *dev;
    293    char *chan;
    294 };
    295 
    296 // toys/other/mkpasswd.c
    297 
    298 struct mkpasswd_data {
    299   long pfd;
    300   char *method;
    301   char *salt;
    302 };
    303 
    304 // toys/other/mkswap.c
    305 
    306 struct mkswap_data {
    307   char *L;
    308 };
    309 
    310 // toys/other/modinfo.c
    311 
    312 struct modinfo_data {
    313   char *field;
    314   char *knam;
    315   char *base;
    316 
    317   long mod;
    318 };
    319 
    320 // toys/other/nsenter.c
    321 
    322 struct nsenter_data {
    323   char *nsnames[6];
    324   long targetpid;
    325 };
    326 
    327 // toys/other/oneit.c
    328 
    329 struct oneit_data {
    330   char *console;
    331 };
    332 
    333 // toys/other/shred.c
    334 
    335 struct shred_data {
    336   long offset;
    337   long iterations;
    338   long size;
    339 
    340   int ufd;
    341 };
    342 
    343 // toys/other/stat.c
    344 
    345 struct stat_data {
    346   char *fmt;
    347 
    348   union {
    349     struct stat st;
    350     struct statfs sf;
    351   } stat;
    352   char *file, *pattern;
    353   int patlen;
    354 };
    355 
    356 // toys/other/swapon.c
    357 
    358 struct swapon_data {
    359   long priority;
    360 };
    361 
    362 // toys/other/switch_root.c
    363 
    364 struct switch_root_data {
    365   char *console;
    366 
    367   dev_t rootdev;
    368 };
    369 
    370 // toys/other/timeout.c
    371 
    372 struct timeout_data {
    373   char *s_signal;
    374   char *k_timeout;
    375 
    376   int nextsig;
    377   pid_t pid;
    378   struct timeval ktv;
    379   struct itimerval itv;
    380 };
    381 
    382 // toys/other/truncate.c
    383 
    384 struct truncate_data {
    385   char *s;
    386 
    387   long size;
    388   int type;
    389 };
    390 
    391 // toys/other/xxd.c
    392 
    393 struct xxd_data {
    394   long s;
    395   long g;
    396   long l;
    397   long c;
    398 };
    399 
    400 // toys/pending/arp.c
    401 
    402 struct arp_data {
    403     char *hw_type;
    404     char *af_type_A;
    405     char *af_type_p;
    406     char *interface;
    407 
    408     int sockfd;
    409     char *device;
    410 };
    411 
    412 // toys/pending/arping.c
    413 
    414 struct arping_data {
    415     long count;
    416     unsigned long time_out;
    417     char *iface;
    418     char *src_ip;
    419 
    420     int sockfd;
    421     unsigned long start, end;
    422     unsigned sent_at, sent_nr, rcvd_nr, brd_sent, rcvd_req, brd_rcv,
    423              unicast_flag;
    424 };
    425 
    426 // toys/pending/bootchartd.c
    427 
    428 struct bootchartd_data {
    429   char buf[32];
    430   long smpl_period_usec;
    431   int proc_accounting;
    432   int is_login;
    433 
    434   void *head;
    435 };
    436 
    437 // toys/pending/brctl.c
    438 
    439 struct brctl_data {
    440     int sockfd;
    441 };
    442 
    443 // toys/pending/chrt.c
    444 
    445 struct chrt_data {
    446   long pid;
    447 };
    448 
    449 // toys/pending/compress.c
    450 
    451 struct compress_data {
    452   // Huffman codes: base offset and extra bits tables (length and distance)
    453   char lenbits[29], distbits[30];
    454   unsigned short lenbase[29], distbase[30];
    455   void *fixdisthuff, *fixlithuff;
    456 
    457   // CRC
    458   void (*crcfunc)(char *data, int len);
    459   unsigned crc;
    460 
    461   // Compressed data buffer
    462   char *data;
    463   unsigned pos, len;
    464   int infd, outfd;
    465 
    466   // Tables only used for deflation
    467   unsigned short *hashhead, *hashchain;
    468 };
    469 
    470 // toys/pending/crond.c
    471 
    472 struct crond_data {
    473   char *crontabs_dir;
    474   char *logfile;
    475   int loglevel_d;
    476   int loglevel;
    477 
    478   time_t crontabs_dir_mtime;
    479   uint8_t flagd;
    480 };
    481 
    482 // toys/pending/crontab.c
    483 
    484 struct crontab_data {
    485   char *user;
    486   char *cdir;
    487 };
    488 
    489 // toys/pending/dd.c
    490 
    491 struct dd_data {
    492   int show_xfer;
    493   int show_records;
    494   unsigned long long bytes, c_count, in_full, in_part, out_full, out_part;
    495   struct timeval start;
    496   struct {
    497     char *name;
    498     int fd;
    499     unsigned char *buff, *bp;
    500     long sz, count;
    501     unsigned long long offset;
    502   } in, out;
    503 };;
    504 
    505 // toys/pending/dhcp.c
    506 
    507 struct dhcp_data {
    508     char *iface;
    509     char *pidfile;
    510     char *script;
    511     long retries;
    512     long timeout;
    513     long tryagain;
    514     struct arg_list *req_opt;
    515     char *req_ip;
    516     struct arg_list *pkt_opt;
    517     char *fdn_name;
    518     char *hostname;
    519     char *vendor_cls;
    520 };
    521 
    522 // toys/pending/dhcp6.c
    523 
    524 struct dhcp6_data {
    525   char *interface_name, *pidfile, *script;
    526   long retry, timeout, errortimeout;
    527   char *req_ip;
    528   int length, state, request_length, sock, sock1, status, retval, retries;
    529   struct timeval tv;
    530   uint8_t transction_id[3];
    531   struct sockaddr_in6 input_socket6;
    532 };
    533 
    534 // toys/pending/dhcpd.c
    535 
    536 struct dhcpd_data {
    537     char *iface;
    538     long port;
    539 };;
    540 
    541 // toys/pending/diff.c
    542 
    543 struct diff_data {
    544   long ct;
    545   char *start;
    546   struct arg_list *L_list;
    547 
    548   int dir_num, size, is_binary, status, change, len[2];
    549   int *offset[2];
    550 };
    551 
    552 // toys/pending/dmesg.c
    553 
    554 struct dmesg_data {
    555   long level;
    556   long size;
    557 
    558   int color;
    559 };
    560 
    561 // toys/pending/dumpleases.c
    562 
    563 struct dumpleases_data {
    564     char *file;
    565 };
    566 
    567 // toys/pending/expr.c
    568 
    569 struct expr_data {
    570   char **tok; // current token, not on the stack since recursive calls mutate it
    571 
    572   char *refree;
    573 };
    574 
    575 // toys/pending/fdisk.c
    576 
    577 struct fdisk_data {
    578   long sect_sz;
    579   long sectors;
    580   long heads;
    581   long cylinders;
    582 };
    583 
    584 // toys/pending/fold.c
    585 
    586 struct fold_data {
    587   int width;
    588 };
    589 
    590 // toys/pending/fsck.c
    591 
    592 struct fsck_data {
    593   int fd_num;
    594   char *t_list;
    595 
    596   struct double_list *devices;
    597   char *arr_flag;
    598   char **arr_type;
    599   int negate;
    600   int sum_status;
    601   int nr_run;
    602   int sig_num;
    603   long max_nr_run;
    604 };
    605 
    606 // toys/pending/getfattr.c
    607 
    608 struct getfattr_data {
    609   char *n;
    610 };
    611 
    612 // toys/pending/getty.c
    613 
    614 struct getty_data {
    615   char *issue_str;
    616   char *login_str;
    617   char *init_str;
    618   char *host_str;
    619   long timeout;
    620 
    621   char *tty_name;
    622   int  speeds[20];
    623   int  sc;
    624   struct termios termios;
    625   char buff[128];
    626 };
    627 
    628 // toys/pending/groupadd.c
    629 
    630 struct groupadd_data {
    631   long gid;
    632 };
    633 
    634 // toys/pending/host.c
    635 
    636 struct host_data {
    637   char *type_str;
    638 };
    639 
    640 // toys/pending/iconv.c
    641 
    642 struct iconv_data {
    643   char *from;
    644   char *to;
    645 
    646   void *ic;
    647 };
    648 
    649 // toys/pending/ip.c
    650 
    651 struct ip_data {
    652   char stats, singleline, flush, *filter_dev, gbuf[8192];
    653   int sockfd, connected, from_ok, route_cmd;
    654   int8_t addressfamily, is_addr;
    655 };
    656 
    657 // toys/pending/ipcrm.c
    658 
    659 struct ipcrm_data {
    660   struct arg_list *qkey;
    661   struct arg_list *qid;
    662   struct arg_list *skey;
    663   struct arg_list *sid;
    664   struct arg_list *mkey;
    665   struct arg_list *mid;
    666 };
    667 
    668 // toys/pending/ipcs.c
    669 
    670 struct ipcs_data {
    671   int id;
    672 };
    673 
    674 // toys/pending/klogd.c
    675 
    676 struct klogd_data {
    677   long level;
    678 
    679   int fd;
    680 };
    681 
    682 // toys/pending/last.c
    683 
    684 struct last_data {
    685   char *file;
    686 
    687   struct arg_list *list;
    688 };
    689 
    690 // toys/pending/logger.c
    691 
    692 struct logger_data {
    693   char *priority_arg;
    694   char *ident;
    695 };
    696 
    697 // toys/pending/lsof.c
    698 
    699 struct lsof_data {
    700   struct arg_list *p;
    701 
    702   struct stat *sought_files;
    703 
    704   struct double_list *all_sockets;
    705   struct double_list *files;
    706   int last_shown_pid;
    707   int shown_header;
    708 };
    709 
    710 // toys/pending/mke2fs.c
    711 
    712 struct mke2fs_data {
    713   // Command line arguments.
    714   long blocksize;
    715   long bytes_per_inode;
    716   long inodes;           // Total inodes in filesystem.
    717   long reserved_percent; // Integer precent of space to reserve for root.
    718   char *gendir;          // Where to read dirtree from.
    719 
    720   // Internal data.
    721   struct dirtree *dt;    // Tree of files to copy into the new filesystem.
    722   unsigned treeblocks;   // Blocks used by dt
    723   unsigned treeinodes;   // Inodes used by dt
    724 
    725   unsigned blocks;       // Total blocks in the filesystem.
    726   unsigned freeblocks;   // Free blocks in the filesystem.
    727   unsigned inodespg;     // Inodes per group
    728   unsigned groups;       // Total number of block groups.
    729   unsigned blockbits;    // Bits per block.  (Also blocks per group.)
    730 
    731   // For gene2fs
    732   unsigned nextblock;    // Next data block to allocate
    733   unsigned nextgroup;    // Next group we'll be allocating from
    734   int fsfd;              // File descriptor of filesystem (to output to).
    735 
    736   struct ext2_superblock sb;
    737 };
    738 
    739 // toys/pending/modprobe.c
    740 
    741 struct modprobe_data {
    742   struct arg_list *dirs;
    743 
    744   struct arg_list *probes;
    745   struct arg_list *dbase[256];
    746   char *cmdopts;
    747   int nudeps;
    748   uint8_t symreq;
    749 };
    750 
    751 // toys/pending/more.c
    752 
    753 struct more_data {
    754   struct termios inf;
    755   int cin_fd;
    756 };
    757 
    758 // toys/pending/openvt.c
    759 
    760 struct openvt_data {
    761   unsigned long vt_num;
    762 };
    763 
    764 // toys/pending/ping.c
    765 
    766 struct ping_data {
    767   long wait_exit;
    768   long wait_resp;
    769   char *iface;
    770   long size;
    771   long count;
    772   long ttl;
    773 
    774   int sock;
    775 };
    776 
    777 // toys/pending/route.c
    778 
    779 struct route_data {
    780   char *family;
    781 };
    782 
    783 // toys/pending/setfattr.c
    784 
    785 struct setfattr_data {
    786   char *x, *v, *n;
    787 };
    788 
    789 // toys/pending/sh.c
    790 
    791 struct sh_data {
    792   char *command;
    793 
    794   long lineno;
    795 };
    796 
    797 // toys/pending/sulogin.c
    798 
    799 struct sulogin_data {
    800   long timeout;
    801   struct termios crntio;
    802 };
    803 
    804 // toys/pending/syslogd.c
    805 
    806 struct syslogd_data {
    807   char *socket;
    808   char *config_file;
    809   char *unix_socket;
    810   char *logfile;
    811   long interval;
    812   long rot_size;
    813   long rot_count;
    814   char *remote_log;
    815   long log_prio;
    816 
    817   struct unsocks *lsocks;  // list of listen sockets
    818   struct logfile *lfiles;  // list of write logfiles
    819   int sigfd[2];
    820 };
    821 
    822 // toys/pending/tar.c
    823 
    824 struct tar_data {
    825   char *fname;
    826   char *dir;
    827   struct arg_list *inc_file;
    828   struct arg_list *exc_file;
    829   char *tocmd;
    830   struct arg_list *exc;
    831 
    832   struct arg_list *inc, *pass;
    833   void *inodes, *handle;
    834 };
    835 
    836 // toys/pending/tcpsvd.c
    837 
    838 struct tcpsvd_data {
    839   char *name;
    840   char *user;
    841   long bn;
    842   char *nmsg;
    843   long cn;
    844 
    845   int maxc;
    846   int count_all;
    847   int udp;
    848 };
    849 
    850 // toys/pending/telnet.c
    851 
    852 struct telnet_data {
    853   int port;
    854   int sfd;
    855   char buff[128];
    856   int pbuff;
    857   char iac[256];
    858   int piac;
    859   char *ttype;
    860   struct termios def_term;
    861   struct termios raw_term;
    862   uint8_t term_ok;
    863   uint8_t term_mode;
    864   uint8_t flags;
    865   unsigned win_width;
    866   unsigned win_height;
    867 };
    868 
    869 // toys/pending/telnetd.c
    870 
    871 struct telnetd_data {
    872     char *login_path;
    873     char *issue_path;
    874     int port;
    875     char *host_addr;
    876     long w_sec;
    877 
    878     int gmax_fd;
    879     pid_t fork_pid;
    880 };
    881 
    882 // toys/pending/tftp.c
    883 
    884 struct tftp_data {
    885   char *local_file;
    886   char *remote_file;
    887   long block_size;
    888 
    889   struct sockaddr_storage inaddr;
    890   int af;
    891 };
    892 
    893 // toys/pending/tftpd.c
    894 
    895 struct tftpd_data {
    896   char *user;
    897 
    898   long sfd;
    899   struct passwd *pw;
    900 };
    901 
    902 // toys/pending/tr.c
    903 
    904 struct tr_data {
    905   short map[256]; //map of chars
    906   int len1, len2;
    907 };
    908 
    909 // toys/pending/traceroute.c
    910 
    911 struct traceroute_data {
    912   long max_ttl;
    913   long port;
    914   long ttl_probes;
    915   char *src_ip;
    916   long tos;
    917   long wait_time;
    918   struct arg_list *loose_source;
    919   long pause_time;
    920   long first_ttl;
    921   char *iface;
    922 
    923   uint32_t gw_list[9];
    924   int recv_sock;
    925   int snd_sock;
    926   unsigned msg_len;
    927   char *packet;
    928   uint32_t ident;
    929   int istraceroute6;
    930 };
    931 
    932 // toys/pending/useradd.c
    933 
    934 struct useradd_data {
    935   char *dir;
    936   char *gecos;
    937   char *shell;
    938   char *u_grp;
    939   long uid;
    940 
    941   long gid;
    942 };
    943 
    944 // toys/pending/vi.c
    945 
    946 struct vi_data {
    947   struct linestack *ls;
    948   char *statline;
    949 };
    950 
    951 // toys/pending/watch.c
    952 
    953 struct watch_data {
    954   int interval;
    955 };
    956 
    957 // toys/pending/wget.c
    958 
    959 struct wget_data {
    960   char *filename;
    961 };
    962 
    963 // toys/posix/chgrp.c
    964 
    965 struct chgrp_data {
    966   uid_t owner;
    967   gid_t group;
    968   char *owner_name, *group_name;
    969   int symfollow;
    970 };
    971 
    972 // toys/posix/chmod.c
    973 
    974 struct chmod_data {
    975   char *mode;
    976 };
    977 
    978 // toys/posix/cksum.c
    979 
    980 struct cksum_data {
    981   unsigned crc_table[256];
    982 };
    983 
    984 // toys/posix/cmp.c
    985 
    986 struct cmp_data {
    987   int fd;
    988   char *name;
    989 };
    990 
    991 // toys/posix/cp.c
    992 
    993 struct cp_data {
    994   union {
    995     struct {
    996       // install's options
    997       char *group;
    998       char *user;
    999       char *mode;
   1000     } i;
   1001     struct {
   1002       char *preserve;
   1003     } c;
   1004   };
   1005 
   1006   char *destname;
   1007   struct stat top;
   1008   int (*callback)(struct dirtree *try);
   1009   uid_t uid;
   1010   gid_t gid;
   1011   int pflags;
   1012 };
   1013 
   1014 // toys/posix/cpio.c
   1015 
   1016 struct cpio_data {
   1017   char *archive;
   1018   char *pass;
   1019   char *fmt;
   1020 };
   1021 
   1022 // toys/posix/cut.c
   1023 
   1024 struct cut_data {
   1025   char *delim;
   1026   char *flist;
   1027   char *clist;
   1028   char *blist;
   1029 
   1030   void *slist_head;
   1031   unsigned nelem;
   1032   void (*do_cut)(int fd);
   1033 };
   1034 
   1035 // toys/posix/date.c
   1036 
   1037 struct date_data {
   1038   char *file;
   1039   char *setfmt;
   1040   char *showdate;
   1041 
   1042   char *tz;
   1043   unsigned nano;
   1044 };
   1045 
   1046 // toys/posix/df.c
   1047 
   1048 struct df_data {
   1049   struct arg_list *fstype;
   1050 
   1051   long units;
   1052   int column_widths[5];
   1053   int header_shown;
   1054 };
   1055 
   1056 // toys/posix/du.c
   1057 
   1058 struct du_data {
   1059   long maxdepth;
   1060 
   1061   unsigned long depth, total;
   1062   dev_t st_dev;
   1063   void *inodes;
   1064 };
   1065 
   1066 // toys/posix/env.c
   1067 
   1068 struct env_data {
   1069   struct arg_list *u;
   1070 };;
   1071 
   1072 // toys/posix/expand.c
   1073 
   1074 struct expand_data {
   1075   struct arg_list *tabs;
   1076 
   1077   unsigned tabcount, *tab;
   1078 };
   1079 
   1080 // toys/posix/file.c
   1081 
   1082 struct file_data {
   1083   int max_name_len;
   1084 };
   1085 
   1086 // toys/posix/find.c
   1087 
   1088 struct find_data {
   1089   char **filter;
   1090   struct double_list *argdata;
   1091   int topdir, xdev, depth;
   1092   time_t now;
   1093 };
   1094 
   1095 // toys/posix/grep.c
   1096 
   1097 struct grep_data {
   1098   long m;
   1099   struct arg_list *f;
   1100   struct arg_list *e;
   1101   long a;
   1102   long b;
   1103   long c;
   1104 
   1105   char indelim, outdelim;
   1106 };
   1107 
   1108 // toys/posix/head.c
   1109 
   1110 struct head_data {
   1111   long lines;
   1112   int file_no;
   1113 };
   1114 
   1115 // toys/posix/id.c
   1116 
   1117 struct id_data {
   1118   int is_groups;
   1119 };
   1120 
   1121 // toys/posix/kill.c
   1122 
   1123 struct kill_data {
   1124   char *signame;
   1125   struct arg_list *olist;
   1126 };
   1127 
   1128 // toys/posix/ls.c
   1129 
   1130 struct ls_data {
   1131   char *color;
   1132 
   1133   struct dirtree *files, *singledir;
   1134 
   1135   unsigned screen_width;
   1136   int nl_title;
   1137   char *escmore;
   1138 };
   1139 
   1140 // toys/posix/mkdir.c
   1141 
   1142 struct mkdir_data {
   1143   char *arg_mode;
   1144   char *arg_context;
   1145 };
   1146 
   1147 // toys/posix/mkfifo.c
   1148 
   1149 struct mkfifo_data {
   1150   char *m_string;
   1151   char *Z;
   1152 
   1153   mode_t mode;
   1154 };
   1155 
   1156 // toys/posix/nice.c
   1157 
   1158 struct nice_data {
   1159   long priority;
   1160 };
   1161 
   1162 // toys/posix/nl.c
   1163 
   1164 struct nl_data {
   1165   long w;
   1166   char *s;
   1167   char *n;
   1168   char *b;
   1169   long l;
   1170   long v;
   1171 
   1172   // Count of consecutive blank lines for -l has to persist between files
   1173   long lcount;
   1174 };
   1175 
   1176 // toys/posix/od.c
   1177 
   1178 struct od_data {
   1179   struct arg_list *output_base;
   1180   char *address_base;
   1181   long max_count;
   1182   long width;
   1183   long jump_bytes;
   1184 
   1185   int address_idx;
   1186   unsigned types, leftover, star;
   1187   char *buf; // Points to buffers[0] or buffers[1].
   1188   char *bufs[2]; // Used to detect duplicate lines.
   1189   off_t pos;
   1190 };
   1191 
   1192 // toys/posix/paste.c
   1193 
   1194 struct paste_data {
   1195   char *d;
   1196 
   1197   int files;
   1198 };
   1199 
   1200 // toys/posix/patch.c
   1201 
   1202 struct patch_data {
   1203   char *infile;
   1204   long prefix;
   1205   char *dir;
   1206 
   1207   struct double_list *current_hunk;
   1208   long oldline, oldlen, newline, newlen;
   1209   long linenum;
   1210   int context, state, filein, fileout, filepatch, hunknum;
   1211   char *tempname;
   1212 };
   1213 
   1214 // toys/posix/ps.c
   1215 
   1216 struct ps_data {
   1217   union {
   1218     struct {
   1219       struct arg_list *G;
   1220       struct arg_list *g;
   1221       struct arg_list *U;
   1222       struct arg_list *u;
   1223       struct arg_list *t;
   1224       struct arg_list *s;
   1225       struct arg_list *p;
   1226       struct arg_list *O;
   1227       struct arg_list *o;
   1228       struct arg_list *P;
   1229       struct arg_list *k;
   1230     } ps;
   1231     struct {
   1232       long n;
   1233       long d;
   1234       long s;
   1235       struct arg_list *u;
   1236       struct arg_list *p;
   1237       struct arg_list *o;
   1238       struct arg_list *k;
   1239       struct arg_list *O;
   1240     } top;
   1241     struct {
   1242       char *L;
   1243       struct arg_list *G;
   1244       struct arg_list *g;
   1245       struct arg_list *P;
   1246       struct arg_list *s;
   1247       struct arg_list *t;
   1248       struct arg_list *U;
   1249       struct arg_list *u;
   1250       char *d;
   1251 
   1252       void *regexes, *snapshot;
   1253       int signal;
   1254       pid_t self, match;
   1255     } pgrep;
   1256   };
   1257 
   1258   struct sysinfo si;
   1259   struct ptr_len gg, GG, pp, PP, ss, tt, uu, UU;
   1260   struct dirtree *threadparent;
   1261   unsigned width, height;
   1262   dev_t tty;
   1263   void *fields, *kfields;
   1264   long long ticks, bits, time;
   1265   int kcount, forcek, sortpos;
   1266   int (*match_process)(long long *slot);
   1267   void (*show_process)(void *tb);
   1268 };
   1269 
   1270 // toys/posix/renice.c
   1271 
   1272 struct renice_data {
   1273   long nArgu;
   1274 };
   1275 
   1276 // toys/posix/sed.c
   1277 
   1278 struct sed_data {
   1279   struct arg_list *f;
   1280   struct arg_list *e;
   1281 
   1282   // processed pattern list
   1283   struct double_list *pattern;
   1284 
   1285   char *nextline, *remember;
   1286   void *restart, *lastregex;
   1287   long nextlen, rememberlen, count;
   1288   int fdout, noeol;
   1289   unsigned xx;
   1290 };
   1291 
   1292 // toys/posix/sort.c
   1293 
   1294 struct sort_data {
   1295   char *key_separator;
   1296   struct arg_list *raw_keys;
   1297   char *outfile;
   1298   char *ignore1, ignore2;   // GNU compatability NOPs for -S and -T.
   1299 
   1300   void *key_list;
   1301   int linecount;
   1302   char **lines;
   1303 };
   1304 
   1305 // toys/posix/split.c
   1306 
   1307 struct split_data {
   1308   long lines;
   1309   long bytes;
   1310   long suflen;
   1311 
   1312   char *outfile;
   1313 };
   1314 
   1315 // toys/posix/strings.c
   1316 
   1317 struct strings_data {
   1318   long num;
   1319 };
   1320 
   1321 // toys/posix/tail.c
   1322 
   1323 struct tail_data {
   1324   long lines;
   1325   long bytes;
   1326 
   1327   int file_no, ffd, *files;
   1328 };
   1329 
   1330 // toys/posix/tee.c
   1331 
   1332 struct tee_data {
   1333   void *outputs;
   1334 };
   1335 
   1336 // toys/posix/touch.c
   1337 
   1338 struct touch_data {
   1339   char *time;
   1340   char *file;
   1341   char *date;
   1342 };
   1343 
   1344 // toys/posix/ulimit.c
   1345 
   1346 struct ulimit_data {
   1347   long pid;
   1348 };
   1349 
   1350 // toys/posix/uniq.c
   1351 
   1352 struct uniq_data {
   1353   long maxchars;
   1354   long nchars;
   1355   long nfields;
   1356   long repeats;
   1357 };
   1358 
   1359 // toys/posix/uudecode.c
   1360 
   1361 struct uudecode_data {
   1362   char *o;
   1363 };
   1364 
   1365 // toys/posix/wc.c
   1366 
   1367 struct wc_data {
   1368   unsigned long totals[4];
   1369 };
   1370 
   1371 // toys/posix/xargs.c
   1372 
   1373 struct xargs_data {
   1374   long max_bytes;
   1375   long max_entries;
   1376   long L;
   1377   char *eofstr;
   1378   char *I;
   1379 
   1380   long entries, bytes;
   1381   char delim;
   1382 };
   1383 
   1384 extern union global_union {
   1385 	struct getprop_data getprop;
   1386 	struct log_data log;
   1387 	struct hello_data hello;
   1388 	struct skeleton_data skeleton;
   1389 	struct hostname_data hostname;
   1390 	struct killall_data killall;
   1391 	struct md5sum_data md5sum;
   1392 	struct mknod_data mknod;
   1393 	struct mktemp_data mktemp;
   1394 	struct mount_data mount;
   1395 	struct passwd_data passwd;
   1396 	struct pidof_data pidof;
   1397 	struct seq_data seq;
   1398 	struct su_data su;
   1399 	struct umount_data umount;
   1400 	struct ftpget_data ftpget;
   1401 	struct ifconfig_data ifconfig;
   1402 	struct microcom_data microcom;
   1403 	struct netcat_data netcat;
   1404 	struct netstat_data netstat;
   1405 	struct tunctl_data tunctl;
   1406 	struct acpi_data acpi;
   1407 	struct base64_data base64;
   1408 	struct blockdev_data blockdev;
   1409 	struct dos2unix_data dos2unix;
   1410 	struct fallocate_data fallocate;
   1411 	struct free_data free;
   1412 	struct hexedit_data hexedit;
   1413 	struct hwclock_data hwclock;
   1414 	struct ionice_data ionice;
   1415 	struct login_data login;
   1416 	struct losetup_data losetup;
   1417 	struct lspci_data lspci;
   1418 	struct makedevs_data makedevs;
   1419 	struct mix_data mix;
   1420 	struct mkpasswd_data mkpasswd;
   1421 	struct mkswap_data mkswap;
   1422 	struct modinfo_data modinfo;
   1423 	struct nsenter_data nsenter;
   1424 	struct oneit_data oneit;
   1425 	struct shred_data shred;
   1426 	struct stat_data stat;
   1427 	struct swapon_data swapon;
   1428 	struct switch_root_data switch_root;
   1429 	struct timeout_data timeout;
   1430 	struct truncate_data truncate;
   1431 	struct xxd_data xxd;
   1432 	struct arp_data arp;
   1433 	struct arping_data arping;
   1434 	struct bootchartd_data bootchartd;
   1435 	struct brctl_data brctl;
   1436 	struct chrt_data chrt;
   1437 	struct compress_data compress;
   1438 	struct crond_data crond;
   1439 	struct crontab_data crontab;
   1440 	struct dd_data dd;
   1441 	struct dhcp_data dhcp;
   1442 	struct dhcp6_data dhcp6;
   1443 	struct dhcpd_data dhcpd;
   1444 	struct diff_data diff;
   1445 	struct dmesg_data dmesg;
   1446 	struct dumpleases_data dumpleases;
   1447 	struct expr_data expr;
   1448 	struct fdisk_data fdisk;
   1449 	struct fold_data fold;
   1450 	struct fsck_data fsck;
   1451 	struct getfattr_data getfattr;
   1452 	struct getty_data getty;
   1453 	struct groupadd_data groupadd;
   1454 	struct host_data host;
   1455 	struct iconv_data iconv;
   1456 	struct ip_data ip;
   1457 	struct ipcrm_data ipcrm;
   1458 	struct ipcs_data ipcs;
   1459 	struct klogd_data klogd;
   1460 	struct last_data last;
   1461 	struct logger_data logger;
   1462 	struct lsof_data lsof;
   1463 	struct mke2fs_data mke2fs;
   1464 	struct modprobe_data modprobe;
   1465 	struct more_data more;
   1466 	struct openvt_data openvt;
   1467 	struct ping_data ping;
   1468 	struct route_data route;
   1469 	struct setfattr_data setfattr;
   1470 	struct sh_data sh;
   1471 	struct sulogin_data sulogin;
   1472 	struct syslogd_data syslogd;
   1473 	struct tar_data tar;
   1474 	struct tcpsvd_data tcpsvd;
   1475 	struct telnet_data telnet;
   1476 	struct telnetd_data telnetd;
   1477 	struct tftp_data tftp;
   1478 	struct tftpd_data tftpd;
   1479 	struct tr_data tr;
   1480 	struct traceroute_data traceroute;
   1481 	struct useradd_data useradd;
   1482 	struct vi_data vi;
   1483 	struct watch_data watch;
   1484 	struct wget_data wget;
   1485 	struct chgrp_data chgrp;
   1486 	struct chmod_data chmod;
   1487 	struct cksum_data cksum;
   1488 	struct cmp_data cmp;
   1489 	struct cp_data cp;
   1490 	struct cpio_data cpio;
   1491 	struct cut_data cut;
   1492 	struct date_data date;
   1493 	struct df_data df;
   1494 	struct du_data du;
   1495 	struct env_data env;
   1496 	struct expand_data expand;
   1497 	struct file_data file;
   1498 	struct find_data find;
   1499 	struct grep_data grep;
   1500 	struct head_data head;
   1501 	struct id_data id;
   1502 	struct kill_data kill;
   1503 	struct ls_data ls;
   1504 	struct mkdir_data mkdir;
   1505 	struct mkfifo_data mkfifo;
   1506 	struct nice_data nice;
   1507 	struct nl_data nl;
   1508 	struct od_data od;
   1509 	struct paste_data paste;
   1510 	struct patch_data patch;
   1511 	struct ps_data ps;
   1512 	struct renice_data renice;
   1513 	struct sed_data sed;
   1514 	struct sort_data sort;
   1515 	struct split_data split;
   1516 	struct strings_data strings;
   1517 	struct tail_data tail;
   1518 	struct tee_data tee;
   1519 	struct touch_data touch;
   1520 	struct ulimit_data ulimit;
   1521 	struct uniq_data uniq;
   1522 	struct uudecode_data uudecode;
   1523 	struct wc_data wc;
   1524 	struct xargs_data xargs;
   1525 } this;
   1526