1 // toys/android/getprop.c
5 char **nv; // name/value pairs: even=name, odd=value
6 struct selabel_handle *handle;
9 // toys/example/hello.c
15 // toys/example/skeleton.c
17 struct skeleton_data {
22 struct arg_list *d_list;
81 struct arg_list *optlist;
127 int ac, bat, therm, cool;
131 // toys/other/base64.c
137 // toys/other/blockdev.c
139 struct blockdev_data {
143 // toys/other/dos2unix.c
145 struct dos2unix_data {
149 // toys/other/fallocate.c
151 struct fallocate_data {
159 unsigned long long units;
163 // toys/other/hexedit.c
165 struct hexedit_data {
168 int numlen, undo, undolen;
172 // toys/other/hwclock.c
174 struct hwclock_data {
180 // toys/other/ifconfig.c
182 struct ifconfig_data {
186 // toys/other/ionice.c
194 // toys/other/login.c
200 int login_timeout, login_fail_timeout;
203 // toys/other/losetup.c
205 struct losetup_data {
215 // toys/other/lspci.c
224 // toys/other/makedevs.c
226 struct makedevs_data {
239 // toys/other/mkpasswd.c
241 struct mkpasswd_data {
247 // toys/other/mkswap.c
253 // toys/other/modinfo.c
255 struct modinfo_data {
263 // toys/other/netcat.c
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.
273 // toys/other/nsenter.c
275 struct nsenter_data {
280 // toys/other/oneit.c
286 // toys/other/shred.c
305 struct passwd *user_name;
306 struct group *group_name;
309 // toys/other/swapon.c
315 // toys/other/switch_root.c
317 struct switch_root_data {
323 // toys/other/timeout.c
325 struct timeout_data {
332 struct itimerval itv;
335 // toys/other/truncate.c
337 struct truncate_data {
352 // toys/pending/arp.c
364 // toys/pending/arping.c
368 unsigned long time_out;
373 unsigned long start, end;
374 unsigned sent_at, sent_nr, rcvd_nr, brd_sent, rcvd_req, brd_rcv,
378 // toys/pending/bootchartd.c
380 struct bootchartd_data {
382 long smpl_period_usec;
389 // toys/pending/brctl.c
395 // toys/pending/compress.c
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;
404 void (*crcfunc)(char *data, int len);
407 // Compressed data buffer
412 // Tables only used for deflation
413 unsigned short *hashhead, *hashchain;
416 // toys/pending/crond.c
424 time_t crontabs_dir_mtime;
428 // toys/pending/crontab.c
430 struct crontab_data {
441 // toys/pending/dhcp.c
450 struct arg_list *req_opt;
452 struct arg_list *pkt_opt;
458 // toys/pending/dhcp6.c
461 char *interface_name, *pidfile, *script;
462 long retry, timeout, errortimeout;
464 int length, state, request_length, sock, sock1, status, retval, retries;
466 uint8_t transction_id[3];
467 struct sockaddr_in6 input_socket6;
470 // toys/pending/dhcpd.c
477 // toys/pending/diff.c
482 struct arg_list *L_list;
484 int dir_num, size, is_binary, status, change, len[2];
488 // toys/pending/dumpleases.c
490 struct dumpleases_data {
494 // toys/pending/expr.c
500 // toys/pending/fdisk.c
509 // toys/pending/file.c
515 // toys/pending/fold.c
521 // toys/pending/fsck.c
527 struct double_list *devices;
537 // toys/pending/ftpget.c
540 long port; // char *port;
547 char buf[sizeof(struct sockaddr_storage)];
550 // toys/pending/getty.c
562 struct termios termios;
566 // toys/pending/groupadd.c
568 struct groupadd_data {
572 // toys/pending/host.c
578 // toys/pending/iconv.c
590 char stats, singleline, flush, *filter_dev, gbuf[8192];
591 int sockfd, connected, from_ok, route_cmd;
592 int8_t addressfamily, is_addr;
595 // toys/pending/ipcrm.c
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;
606 // toys/pending/ipcs.c
612 // toys/pending/klogd.c
620 // toys/pending/last.c
625 struct arg_list *list;
628 // toys/pending/logger.c
635 // toys/pending/lsof.c
640 struct stat *sought_files;
642 struct double_list *files;
647 // toys/pending/mke2fs.c
650 // Command line arguments.
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.
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
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.)
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).
673 struct ext2_superblock sb;
676 // toys/pending/modprobe.c
678 struct modprobe_data {
679 struct arg_list *probes;
680 struct arg_list *dbase[256];
684 void (*dbg)(char *format, ...);
687 // toys/pending/more.c
694 // toys/pending/netstat.c
696 struct netstat_data {
697 char current_name[21];
698 int some_process_unidentified;
701 // toys/pending/openvt.c
704 unsigned long vt_num;
707 // toys/pending/ping.c
720 // toys/pending/route.c
732 // toys/pending/sulogin.c
734 struct sulogin_data {
736 struct termios crntio;
739 // toys/pending/syslogd.c
741 struct syslogd_data {
752 struct unsocks *lsocks; // list of listen sockets
753 struct logfile *lfiles; // list of write logfiles
757 // toys/pending/tar.c
762 struct arg_list *inc_file;
763 struct arg_list *exc_file;
765 struct arg_list *exc;
767 struct arg_list *inc, *pass;
768 void *inodes, *handle;
771 // toys/pending/tcpsvd.c
785 // toys/pending/telnet.c
795 struct termios def_term;
796 struct termios raw_term;
804 // toys/pending/telnetd.c
806 struct telnetd_data {
817 // toys/pending/tftp.c
824 struct sockaddr_storage inaddr;
828 // toys/pending/tftpd.c
840 short map[256]; //map of chars
844 // toys/pending/traceroute.c
846 struct traceroute_data {
853 struct arg_list *loose_source;
867 // toys/pending/useradd.c
869 struct useradd_data {
882 struct linestack *ls;
886 // toys/pending/watch.c
892 // toys/posix/chgrp.c
897 char *owner_name, *group_name;
901 // toys/posix/chmod.c
907 // toys/posix/cksum.c
910 unsigned crc_table[256];
937 int (*callback)(struct dirtree *try);
961 void (*do_cut)(int fd);
978 struct arg_list *fstype;
981 int column_widths[5];
990 unsigned long depth, total;
1001 // toys/posix/expand.c
1003 struct expand_data {
1004 struct arg_list *tabs;
1006 unsigned tabcount, *tab;
1009 // toys/posix/find.c
1013 struct double_list *argdata;
1014 int topdir, xdev, depth;
1018 // toys/posix/grep.c
1028 char indelim, outdelim;
1031 // toys/posix/head.c
1044 // toys/posix/kill.c
1048 struct arg_list *olist;
1056 struct dirtree *files, *singledir;
1058 unsigned screen_width;
1060 char uid_buf[12], gid_buf[12];
1063 // toys/posix/mkdir.c
1070 // toys/posix/mkfifo.c
1072 struct mkfifo_data {
1079 // toys/posix/nice.c
1095 // Count of consecutive blank lines for -l has to persist between files
1102 struct arg_list *output_base;
1108 unsigned types, leftover, star;
1110 uint64_t bufs[4]; // force 64-bit alignment
1114 // toys/posix/paste.c
1120 // toys/posix/patch.c
1126 struct double_list *current_hunk;
1127 long oldline, oldlen, newline, newlen;
1129 int context, state, filein, fileout, filepatch, hunknum;
1170 void *regexes, *snapshot;
1177 struct ptr_len gg, GG, pp, PP, ss, tt, uu, UU;
1178 unsigned width, height;
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);
1187 // toys/posix/renice.c
1189 struct renice_data {
1199 // processed pattern list
1200 struct double_list *pattern;
1202 char *nextline, *remember;
1203 void *restart, *lastregex;
1204 long nextlen, rememberlen, count;
1209 // toys/posix/sort.c
1212 char *key_separator;
1213 struct arg_list *raw_keys;
1215 char *ignore1, ignore2; // GNU compatability NOPs for -S and -T.
1222 // toys/posix/split.c
1232 // toys/posix/strings.c
1234 struct strings_data {
1238 // toys/posix/tail.c
1244 int file_no, ffd, *files;
1253 // toys/posix/touch.c
1261 // toys/posix/ulimit.c
1263 struct ulimit_data {
1267 // toys/posix/uniq.c
1276 // toys/posix/uudecode.c
1278 struct uudecode_data {
1285 unsigned long totals[3];
1288 // toys/posix/xargs.c
1297 long entries, bytes;
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;
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;
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;
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;
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;
1391 struct traceroute_data traceroute;
1392 struct useradd_data useradd;
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;
1400 struct cpio_data cpio;
1401 struct cut_data cut;
1402 struct date_data date;
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;
1411 struct kill_data kill;
1413 struct mkdir_data mkdir;
1414 struct mkfifo_data mkfifo;
1415 struct nice_data nice;
1418 struct paste_data paste;
1419 struct patch_data patch;
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;
1433 struct xargs_data xargs;