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/pending/wget.c
898 // toys/posix/chgrp.c
903 char *owner_name, *group_name;
907 // toys/posix/chmod.c
913 // toys/posix/cksum.c
916 unsigned crc_table[256];
943 int (*callback)(struct dirtree *try);
967 void (*do_cut)(int fd);
984 struct arg_list *fstype;
987 int column_widths[5];
1007 // toys/posix/expand.c
1009 struct expand_data {
1010 struct arg_list *tabs;
1012 unsigned tabcount, *tab;
1015 // toys/posix/find.c
1019 struct double_list *argdata;
1020 int topdir, xdev, depth;
1024 // toys/posix/grep.c
1034 char indelim, outdelim;
1037 // toys/posix/head.c
1050 // toys/posix/kill.c
1054 struct arg_list *olist;
1062 struct dirtree *files, *singledir;
1064 unsigned screen_width;
1066 char uid_buf[12], gid_buf[12];
1069 // toys/posix/mkdir.c
1076 // toys/posix/mkfifo.c
1078 struct mkfifo_data {
1085 // toys/posix/nice.c
1101 // Count of consecutive blank lines for -l has to persist between files
1108 struct arg_list *output_base;
1114 unsigned types, leftover, star;
1116 uint64_t bufs[4]; // force 64-bit alignment
1120 // toys/posix/paste.c
1126 // toys/posix/patch.c
1132 struct double_list *current_hunk;
1133 long oldline, oldlen, newline, newlen;
1135 int context, state, filein, fileout, filepatch, hunknum;
1176 void *regexes, *snapshot;
1183 struct ptr_len gg, GG, pp, PP, ss, tt, uu, UU;
1184 unsigned width, height;
1186 void *fields, *kfields;
1187 long long ticks, bits, time;
1188 int kcount, forcek, sortpos;
1189 int (*match_process)(long long *slot);
1190 void (*show_process)(void *tb);
1193 // toys/posix/renice.c
1195 struct renice_data {
1205 // processed pattern list
1206 struct double_list *pattern;
1208 char *nextline, *remember;
1209 void *restart, *lastregex;
1210 long nextlen, rememberlen, count;
1215 // toys/posix/sort.c
1218 char *key_separator;
1219 struct arg_list *raw_keys;
1221 char *ignore1, ignore2; // GNU compatability NOPs for -S and -T.
1228 // toys/posix/split.c
1238 // toys/posix/strings.c
1240 struct strings_data {
1244 // toys/posix/tail.c
1250 int file_no, ffd, *files;
1259 // toys/posix/touch.c
1267 // toys/posix/ulimit.c
1269 struct ulimit_data {
1273 // toys/posix/uniq.c
1282 // toys/posix/uudecode.c
1284 struct uudecode_data {
1291 unsigned long totals[3];
1294 // toys/posix/xargs.c
1303 long entries, bytes;
1307 extern union global_union {
1308 struct getprop_data getprop;
1309 struct hello_data hello;
1310 struct skeleton_data skeleton;
1311 struct dmesg_data dmesg;
1312 struct killall_data killall;
1313 struct md5sum_data md5sum;
1314 struct mknod_data mknod;
1315 struct mktemp_data mktemp;
1316 struct mount_data mount;
1317 struct passwd_data passwd;
1318 struct pidof_data pidof;
1319 struct seq_data seq;
1321 struct umount_data umount;
1322 struct acpi_data acpi;
1323 struct base64_data base64;
1324 struct blockdev_data blockdev;
1325 struct dos2unix_data dos2unix;
1326 struct fallocate_data fallocate;
1327 struct free_data free;
1328 struct hexedit_data hexedit;
1329 struct hwclock_data hwclock;
1330 struct ifconfig_data ifconfig;
1331 struct ionice_data ionice;
1332 struct login_data login;
1333 struct losetup_data losetup;
1334 struct lspci_data lspci;
1335 struct makedevs_data makedevs;
1336 struct mix_data mix;
1337 struct mkpasswd_data mkpasswd;
1338 struct mkswap_data mkswap;
1339 struct modinfo_data modinfo;
1340 struct netcat_data netcat;
1341 struct nsenter_data nsenter;
1342 struct oneit_data oneit;
1343 struct shred_data shred;
1344 struct stat_data stat;
1345 struct swapon_data swapon;
1346 struct switch_root_data switch_root;
1347 struct timeout_data timeout;
1348 struct truncate_data truncate;
1349 struct xxd_data xxd;
1350 struct arp_data arp;
1351 struct arping_data arping;
1352 struct bootchartd_data bootchartd;
1353 struct brctl_data brctl;
1354 struct compress_data compress;
1355 struct crond_data crond;
1356 struct crontab_data crontab;
1358 struct dhcp_data dhcp;
1359 struct dhcp6_data dhcp6;
1360 struct dhcpd_data dhcpd;
1361 struct diff_data diff;
1362 struct dumpleases_data dumpleases;
1363 struct expr_data expr;
1364 struct fdisk_data fdisk;
1365 struct file_data file;
1366 struct fold_data fold;
1367 struct fsck_data fsck;
1368 struct ftpget_data ftpget;
1369 struct getty_data getty;
1370 struct groupadd_data groupadd;
1371 struct host_data host;
1372 struct iconv_data iconv;
1374 struct ipcrm_data ipcrm;
1375 struct ipcs_data ipcs;
1376 struct klogd_data klogd;
1377 struct last_data last;
1378 struct logger_data logger;
1379 struct lsof_data lsof;
1380 struct mke2fs_data mke2fs;
1381 struct modprobe_data modprobe;
1382 struct more_data more;
1383 struct netstat_data netstat;
1384 struct openvt_data openvt;
1385 struct ping_data ping;
1386 struct route_data route;
1388 struct sulogin_data sulogin;
1389 struct syslogd_data syslogd;
1390 struct tar_data tar;
1391 struct tcpsvd_data tcpsvd;
1392 struct telnet_data telnet;
1393 struct telnetd_data telnetd;
1394 struct tftp_data tftp;
1395 struct tftpd_data tftpd;
1397 struct traceroute_data traceroute;
1398 struct useradd_data useradd;
1400 struct watch_data watch;
1401 struct wget_data wget;
1402 struct chgrp_data chgrp;
1403 struct chmod_data chmod;
1404 struct cksum_data cksum;
1405 struct cmp_data cmp;
1407 struct cpio_data cpio;
1408 struct cut_data cut;
1409 struct date_data date;
1412 struct env_data env;
1413 struct expand_data expand;
1414 struct find_data find;
1415 struct grep_data grep;
1416 struct head_data head;
1418 struct kill_data kill;
1420 struct mkdir_data mkdir;
1421 struct mkfifo_data mkfifo;
1422 struct nice_data nice;
1425 struct paste_data paste;
1426 struct patch_data patch;
1428 struct renice_data renice;
1429 struct sed_data sed;
1430 struct sort_data sort;
1431 struct split_data split;
1432 struct strings_data strings;
1433 struct tail_data tail;
1434 struct tee_data tee;
1435 struct touch_data touch;
1436 struct ulimit_data ulimit;
1437 struct uniq_data uniq;
1438 struct uudecode_data uudecode;
1440 struct xargs_data xargs;