1 // toys/android/getprop.c
5 char **nv; // name/value pairs: even=name, odd=value
8 // toys/example/hello.c
14 // toys/example/skeleton.c
16 struct skeleton_data {
21 struct arg_list *d_list;
80 struct arg_list *optlist;
126 int ac, bat, therm, cool;
130 // toys/other/base64.c
136 // toys/other/blockdev.c
138 struct blockdev_data {
142 // toys/other/dos2unix.c
144 struct dos2unix_data {
148 // toys/other/fallocate.c
150 struct fallocate_data {
158 unsigned long long units;
161 // toys/other/hexedit.c
163 struct hexedit_data {
166 int numlen, undo, undolen;
170 // toys/other/hwclock.c
172 struct hwclock_data {
178 // toys/other/ifconfig.c
180 struct ifconfig_data {
184 // toys/other/ionice.c
192 // toys/other/login.c
198 int login_timeout, login_fail_timeout;
201 // toys/other/losetup.c
203 struct losetup_data {
213 // toys/other/lspci.c
222 // toys/other/makedevs.c
224 struct makedevs_data {
237 // toys/other/mkpasswd.c
239 struct mkpasswd_data {
245 // toys/other/modinfo.c
247 struct modinfo_data {
255 // toys/other/netcat.c
258 char *filename; // -f read from filename instead of network
259 long quit_delay; // -q Exit after EOF from stdin after # seconds.
260 char *source_address; // -s Bind to a specific source address.
261 long port; // -p Bind to a specific source port.
262 long wait; // -w Wait # seconds for a connection.
265 // toys/other/nsenter.c
267 struct nsenter_data {
272 // toys/other/oneit.c
278 // toys/other/shred.c
297 struct passwd *user_name;
298 struct group *group_name;
301 // toys/other/swapon.c
307 // toys/other/switch_root.c
309 struct switch_root_data {
315 // toys/other/taskset.c
317 struct taskset_data {
321 // toys/other/timeout.c
323 struct timeout_data {
330 struct itimerval itv;
333 // toys/other/truncate.c
335 struct truncate_data {
350 // toys/pending/arp.c
362 // toys/pending/arping.c
366 unsigned long time_out;
379 unsigned unicast_flag;
382 // toys/pending/bootchartd.c
384 struct bootchartd_data {
386 long smpl_period_usec;
393 // toys/pending/brctl.c
399 // toys/pending/compress.c
401 struct compress_data {
402 // Huffman codes: base offset and extra bits tables (length and distance)
403 char lenbits[29], distbits[30];
404 unsigned short lenbase[29], distbase[30];
405 void *fixdisthuff, *fixlithuff;
408 void (*crcfunc)(char *data, int len);
411 // Compressed data buffer
416 // Tables only used for deflation
417 unsigned short *hashhead, *hashchain;
420 // toys/pending/crond.c
428 time_t crontabs_dir_mtime;
432 // toys/pending/crontab.c
434 struct crontab_data {
445 // toys/pending/dhcp.c
454 struct arg_list *req_opt;
456 struct arg_list *pkt_opt;
462 // toys/pending/dhcpd.c
469 // toys/pending/diff.c
474 struct arg_list *L_list;
476 int dir_num, size, is_binary, status, change, len[2];
480 // toys/pending/dumpleases.c
482 struct dumpleases_data {
486 // toys/pending/expr.c
492 // toys/pending/fdisk.c
501 // toys/pending/fold.c
507 // toys/pending/fsck.c
513 struct double_list *devices;
523 // toys/pending/ftpget.c
526 long port; // char *port;
533 char buf[sizeof(struct sockaddr_storage)];
536 // toys/pending/getty.c
548 struct termios termios;
552 // toys/pending/groupadd.c
554 struct groupadd_data {
558 // toys/pending/host.c
564 // toys/pending/iconv.c
576 char stats, singleline, flush, *filter_dev, gbuf[8192];
577 int sockfd, connected, from_ok, route_cmd;
578 int8_t addressfamily, is_addr;
581 // toys/pending/ipcrm.c
584 struct arg_list *qkey;
585 struct arg_list *qid;
586 struct arg_list *skey;
587 struct arg_list *sid;
588 struct arg_list *mkey;
589 struct arg_list *mid;
592 // toys/pending/ipcs.c
598 // toys/pending/klogd.c
606 // toys/pending/last.c
611 struct arg_list *list;
614 // toys/pending/logger.c
621 // toys/pending/mke2fs.c
624 // Command line arguments.
626 long bytes_per_inode;
627 long inodes; // Total inodes in filesystem.
628 long reserved_percent; // Integer precent of space to reserve for root.
629 char *gendir; // Where to read dirtree from.
632 struct dirtree *dt; // Tree of files to copy into the new filesystem.
633 unsigned treeblocks; // Blocks used by dt
634 unsigned treeinodes; // Inodes used by dt
636 unsigned blocks; // Total blocks in the filesystem.
637 unsigned freeblocks; // Free blocks in the filesystem.
638 unsigned inodespg; // Inodes per group
639 unsigned groups; // Total number of block groups.
640 unsigned blockbits; // Bits per block. (Also blocks per group.)
643 unsigned nextblock; // Next data block to allocate
644 unsigned nextgroup; // Next group we'll be allocating from
645 int fsfd; // File descriptor of filesystem (to output to).
647 struct ext2_superblock sb;
650 // toys/pending/modprobe.c
652 struct modprobe_data {
653 struct arg_list *probes;
654 struct arg_list *dbase[256];
658 void (*dbg)(char *format, ...);
661 // toys/pending/more.c
668 // toys/pending/openvt.c
671 unsigned long vt_num;
674 // toys/pending/pgrep.c
682 // toys/pending/ping.c
706 // toys/pending/route.c
718 // toys/pending/sulogin.c
720 struct sulogin_data {
722 struct termios crntio;
725 // toys/pending/syslogd.c
727 struct syslogd_data {
738 struct unsocks *lsocks; // list of listen sockets
739 struct logfile *lfiles; // list of write logfiles
743 // toys/pending/tar.c
748 struct arg_list *inc_file;
749 struct arg_list *exc_file;
751 struct arg_list *exc;
753 struct arg_list *inc, *pass;
754 void *inodes, *handle;
757 // toys/pending/tcpsvd.c
771 // toys/pending/telnet.c
781 struct termios def_term;
782 struct termios raw_term;
790 // toys/pending/telnetd.c
792 struct telnetd_data {
803 // toys/pending/tftp.c
810 struct sockaddr_storage inaddr;
814 // toys/pending/tftpd.c
823 // toys/pending/top.c
843 short map[256]; //map of chars
847 // toys/pending/traceroute.c
849 struct traceroute_data {
856 struct arg_list *loose_source;
870 // toys/pending/useradd.c
872 struct useradd_data {
882 // toys/pending/watch.c
888 // toys/posix/chgrp.c
893 char *owner_name, *group_name;
897 // toys/posix/chmod.c
903 // toys/posix/cksum.c
906 unsigned crc_table[256];
933 int (*callback)(struct dirtree *try);
957 void (*do_cut)(int fd);
974 struct arg_list *fstype;
989 // toys/posix/expand.c
992 struct arg_list *tabs;
994 unsigned tabcount, *tab;
1001 struct double_list *argdata;
1002 int topdir, xdev, depth, envsize;
1006 // toys/posix/grep.c
1013 struct arg_list *regex;
1016 // toys/posix/head.c
1029 // toys/posix/kill.c
1033 struct arg_list *olist;
1041 struct dirtree *files, *singledir;
1043 unsigned screen_width;
1045 char uid_buf[12], gid_buf[12];
1048 // toys/posix/mkdir.c
1055 // toys/posix/mkfifo.c
1057 struct mkfifo_data {
1064 // toys/posix/nice.c
1080 // Count of consecutive blank lines for -l has to persist between files
1087 struct arg_list *output_base;
1093 unsigned types, leftover, star;
1095 uint64_t bufs[4]; // force 64-bit alignment
1099 // toys/posix/paste.c
1105 // toys/posix/patch.c
1111 struct double_list *current_hunk;
1112 long oldline, oldlen, newline, newlen;
1114 int context, state, filein, fileout, filepatch, hunknum;
1118 // toys/posix/renice.c
1120 struct renice_data {
1130 // processed pattern list
1131 struct double_list *pattern;
1133 char *nextline, *remember;
1134 void *restart, *lastregex;
1135 long nextlen, rememberlen, count;
1140 // toys/posix/sort.c
1143 char *key_separator;
1144 struct arg_list *raw_keys;
1146 char *ignore1, ignore2; // GNU compatability NOPs for -S and -T.
1153 // toys/posix/split.c
1163 // toys/posix/strings.c
1165 struct strings_data {
1169 // toys/posix/tail.c
1184 // toys/posix/touch.c
1192 // toys/posix/uniq.c
1201 // toys/posix/uudecode.c
1203 struct uudecode_data {
1210 unsigned long totals[3];
1213 // toys/posix/xargs.c
1222 long entries, bytes;
1226 extern union global_union {
1227 struct getprop_data getprop;
1228 struct hello_data hello;
1229 struct skeleton_data skeleton;
1230 struct dmesg_data dmesg;
1231 struct killall_data killall;
1232 struct md5sum_data md5sum;
1233 struct mknod_data mknod;
1234 struct mktemp_data mktemp;
1235 struct mount_data mount;
1236 struct passwd_data passwd;
1237 struct pidof_data pidof;
1238 struct seq_data seq;
1240 struct umount_data umount;
1241 struct acpi_data acpi;
1242 struct base64_data base64;
1243 struct blockdev_data blockdev;
1244 struct dos2unix_data dos2unix;
1245 struct fallocate_data fallocate;
1246 struct free_data free;
1247 struct hexedit_data hexedit;
1248 struct hwclock_data hwclock;
1249 struct ifconfig_data ifconfig;
1250 struct ionice_data ionice;
1251 struct login_data login;
1252 struct losetup_data losetup;
1253 struct lspci_data lspci;
1254 struct makedevs_data makedevs;
1255 struct mix_data mix;
1256 struct mkpasswd_data mkpasswd;
1257 struct modinfo_data modinfo;
1258 struct netcat_data netcat;
1259 struct nsenter_data nsenter;
1260 struct oneit_data oneit;
1261 struct shred_data shred;
1262 struct stat_data stat;
1263 struct swapon_data swapon;
1264 struct switch_root_data switch_root;
1265 struct taskset_data taskset;
1266 struct timeout_data timeout;
1267 struct truncate_data truncate;
1268 struct xxd_data xxd;
1269 struct arp_data arp;
1270 struct arping_data arping;
1271 struct bootchartd_data bootchartd;
1272 struct brctl_data brctl;
1273 struct compress_data compress;
1274 struct crond_data crond;
1275 struct crontab_data crontab;
1277 struct dhcp_data dhcp;
1278 struct dhcpd_data dhcpd;
1279 struct diff_data diff;
1280 struct dumpleases_data dumpleases;
1281 struct expr_data expr;
1282 struct fdisk_data fdisk;
1283 struct fold_data fold;
1284 struct fsck_data fsck;
1285 struct ftpget_data ftpget;
1286 struct getty_data getty;
1287 struct groupadd_data groupadd;
1288 struct host_data host;
1289 struct iconv_data iconv;
1291 struct ipcrm_data ipcrm;
1292 struct ipcs_data ipcs;
1293 struct klogd_data klogd;
1294 struct last_data last;
1295 struct logger_data logger;
1296 struct mke2fs_data mke2fs;
1297 struct modprobe_data modprobe;
1298 struct more_data more;
1299 struct openvt_data openvt;
1300 struct pgrep_data pgrep;
1301 struct ping_data ping;
1303 struct route_data route;
1305 struct sulogin_data sulogin;
1306 struct syslogd_data syslogd;
1307 struct tar_data tar;
1308 struct tcpsvd_data tcpsvd;
1309 struct telnet_data telnet;
1310 struct telnetd_data telnetd;
1311 struct tftp_data tftp;
1312 struct tftpd_data tftpd;
1313 struct top_data top;
1315 struct traceroute_data traceroute;
1316 struct useradd_data useradd;
1317 struct watch_data watch;
1318 struct chgrp_data chgrp;
1319 struct chmod_data chmod;
1320 struct cksum_data cksum;
1321 struct cmp_data cmp;
1323 struct cpio_data cpio;
1324 struct cut_data cut;
1325 struct date_data date;
1328 struct expand_data expand;
1329 struct find_data find;
1330 struct grep_data grep;
1331 struct head_data head;
1333 struct kill_data kill;
1335 struct mkdir_data mkdir;
1336 struct mkfifo_data mkfifo;
1337 struct nice_data nice;
1340 struct paste_data paste;
1341 struct patch_data patch;
1342 struct renice_data renice;
1343 struct sed_data sed;
1344 struct sort_data sort;
1345 struct split_data split;
1346 struct strings_data strings;
1347 struct tail_data tail;
1348 struct tee_data tee;
1349 struct touch_data touch;
1350 struct uniq_data uniq;
1351 struct uudecode_data uudecode;
1353 struct xargs_data xargs;