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