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