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