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/timeout.c
317 struct timeout_data {
324 struct itimerval itv;
327 // toys/other/truncate.c
329 struct truncate_data {
344 // toys/pending/arp.c
356 // toys/pending/arping.c
360 unsigned long time_out;
365 unsigned long start, end;
366 unsigned sent_at, sent_nr, rcvd_nr, brd_sent, rcvd_req, brd_rcv,
370 // toys/pending/bootchartd.c
372 struct bootchartd_data {
374 long smpl_period_usec;
381 // toys/pending/brctl.c
387 // toys/pending/compress.c
389 struct compress_data {
390 // Huffman codes: base offset and extra bits tables (length and distance)
391 char lenbits[29], distbits[30];
392 unsigned short lenbase[29], distbase[30];
393 void *fixdisthuff, *fixlithuff;
396 void (*crcfunc)(char *data, int len);
399 // Compressed data buffer
404 // Tables only used for deflation
405 unsigned short *hashhead, *hashchain;
408 // toys/pending/crond.c
416 time_t crontabs_dir_mtime;
420 // toys/pending/crontab.c
422 struct crontab_data {
433 // toys/pending/dhcp.c
442 struct arg_list *req_opt;
444 struct arg_list *pkt_opt;
450 // toys/pending/dhcp6.c
453 char *interface_name, *pidfile, *script;
454 long retry, timeout, errortimeout;
456 int length, state, request_length, sock, sock1, status, retval, retries;
458 uint8_t transction_id[3];
459 struct sockaddr_in6 input_socket6;
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/lsof.c
626 struct stat *sought_files;
628 struct double_list *files;
633 // toys/pending/mke2fs.c
636 // Command line arguments.
638 long bytes_per_inode;
639 long inodes; // Total inodes in filesystem.
640 long reserved_percent; // Integer precent of space to reserve for root.
641 char *gendir; // Where to read dirtree from.
644 struct dirtree *dt; // Tree of files to copy into the new filesystem.
645 unsigned treeblocks; // Blocks used by dt
646 unsigned treeinodes; // Inodes used by dt
648 unsigned blocks; // Total blocks in the filesystem.
649 unsigned freeblocks; // Free blocks in the filesystem.
650 unsigned inodespg; // Inodes per group
651 unsigned groups; // Total number of block groups.
652 unsigned blockbits; // Bits per block. (Also blocks per group.)
655 unsigned nextblock; // Next data block to allocate
656 unsigned nextgroup; // Next group we'll be allocating from
657 int fsfd; // File descriptor of filesystem (to output to).
659 struct ext2_superblock sb;
662 // toys/pending/modprobe.c
664 struct modprobe_data {
665 struct arg_list *probes;
666 struct arg_list *dbase[256];
670 void (*dbg)(char *format, ...);
673 // toys/pending/more.c
680 // toys/pending/netstat.c
682 struct netstat_data {
683 char current_name[21];
684 int some_process_unidentified;
687 // toys/pending/openvt.c
690 unsigned long vt_num;
693 // toys/pending/pgrep.c
702 // toys/pending/ping.c
715 // toys/pending/route.c
727 // toys/pending/sulogin.c
729 struct sulogin_data {
731 struct termios crntio;
734 // toys/pending/syslogd.c
736 struct syslogd_data {
747 struct unsocks *lsocks; // list of listen sockets
748 struct logfile *lfiles; // list of write logfiles
752 // toys/pending/tar.c
757 struct arg_list *inc_file;
758 struct arg_list *exc_file;
760 struct arg_list *exc;
762 struct arg_list *inc, *pass;
763 void *inodes, *handle;
766 // toys/pending/tcpsvd.c
780 // toys/pending/telnet.c
790 struct termios def_term;
791 struct termios raw_term;
799 // toys/pending/telnetd.c
801 struct telnetd_data {
812 // toys/pending/tftp.c
819 struct sockaddr_storage inaddr;
823 // toys/pending/tftpd.c
832 // toys/pending/top.c
852 short map[256]; //map of chars
856 // toys/pending/traceroute.c
858 struct traceroute_data {
865 struct arg_list *loose_source;
879 // toys/pending/useradd.c
881 struct useradd_data {
891 // toys/pending/watch.c
897 // toys/posix/chgrp.c
902 char *owner_name, *group_name;
906 // toys/posix/chmod.c
912 // toys/posix/cksum.c
915 unsigned crc_table[256];
942 int (*callback)(struct dirtree *try);
966 void (*do_cut)(int fd);
983 struct arg_list *fstype;
986 int column_widths[5];
1000 // toys/posix/expand.c
1002 struct expand_data {
1003 struct arg_list *tabs;
1005 unsigned tabcount, *tab;
1008 // toys/posix/find.c
1012 struct double_list *argdata;
1013 int topdir, xdev, depth, envsize;
1017 // toys/posix/grep.c
1025 // toys/posix/head.c
1038 // toys/posix/kill.c
1042 struct arg_list *olist;
1050 struct dirtree *files, *singledir;
1052 unsigned screen_width;
1054 char uid_buf[12], gid_buf[12];
1057 // toys/posix/mkdir.c
1064 // toys/posix/mkfifo.c
1066 struct mkfifo_data {
1073 // toys/posix/nice.c
1089 // Count of consecutive blank lines for -l has to persist between files
1096 struct arg_list *output_base;
1102 unsigned types, leftover, star;
1104 uint64_t bufs[4]; // force 64-bit alignment
1108 // toys/posix/paste.c
1114 // toys/posix/patch.c
1120 struct double_list *current_hunk;
1121 long oldline, oldlen, newline, newlen;
1123 int context, state, filein, fileout, filepatch, hunknum;
1140 struct ptr_len gg, GG, pp, PP, ss, tt, uu, UU, *parsing;
1149 // toys/posix/renice.c
1151 struct renice_data {
1161 // processed pattern list
1162 struct double_list *pattern;
1164 char *nextline, *remember;
1165 void *restart, *lastregex;
1166 long nextlen, rememberlen, count;
1171 // toys/posix/sort.c
1174 char *key_separator;
1175 struct arg_list *raw_keys;
1177 char *ignore1, ignore2; // GNU compatability NOPs for -S and -T.
1184 // toys/posix/split.c
1194 // toys/posix/strings.c
1196 struct strings_data {
1200 // toys/posix/tail.c
1215 // toys/posix/touch.c
1223 // toys/posix/uniq.c
1232 // toys/posix/uudecode.c
1234 struct uudecode_data {
1241 unsigned long totals[3];
1244 // toys/posix/xargs.c
1253 long entries, bytes;
1257 extern union global_union {
1258 struct getprop_data getprop;
1259 struct hello_data hello;
1260 struct skeleton_data skeleton;
1261 struct dmesg_data dmesg;
1262 struct killall_data killall;
1263 struct md5sum_data md5sum;
1264 struct mknod_data mknod;
1265 struct mktemp_data mktemp;
1266 struct mount_data mount;
1267 struct passwd_data passwd;
1268 struct pidof_data pidof;
1269 struct seq_data seq;
1271 struct umount_data umount;
1272 struct acpi_data acpi;
1273 struct base64_data base64;
1274 struct blockdev_data blockdev;
1275 struct dos2unix_data dos2unix;
1276 struct fallocate_data fallocate;
1277 struct free_data free;
1278 struct hexedit_data hexedit;
1279 struct hwclock_data hwclock;
1280 struct ifconfig_data ifconfig;
1281 struct ionice_data ionice;
1282 struct login_data login;
1283 struct losetup_data losetup;
1284 struct lspci_data lspci;
1285 struct makedevs_data makedevs;
1286 struct mix_data mix;
1287 struct mkpasswd_data mkpasswd;
1288 struct modinfo_data modinfo;
1289 struct netcat_data netcat;
1290 struct nsenter_data nsenter;
1291 struct oneit_data oneit;
1292 struct shred_data shred;
1293 struct stat_data stat;
1294 struct swapon_data swapon;
1295 struct switch_root_data switch_root;
1296 struct timeout_data timeout;
1297 struct truncate_data truncate;
1298 struct xxd_data xxd;
1299 struct arp_data arp;
1300 struct arping_data arping;
1301 struct bootchartd_data bootchartd;
1302 struct brctl_data brctl;
1303 struct compress_data compress;
1304 struct crond_data crond;
1305 struct crontab_data crontab;
1307 struct dhcp_data dhcp;
1308 struct dhcp6_data dhcp6;
1309 struct dhcpd_data dhcpd;
1310 struct diff_data diff;
1311 struct dumpleases_data dumpleases;
1312 struct expr_data expr;
1313 struct fdisk_data fdisk;
1314 struct fold_data fold;
1315 struct fsck_data fsck;
1316 struct ftpget_data ftpget;
1317 struct getty_data getty;
1318 struct groupadd_data groupadd;
1319 struct host_data host;
1320 struct iconv_data iconv;
1322 struct ipcrm_data ipcrm;
1323 struct ipcs_data ipcs;
1324 struct klogd_data klogd;
1325 struct last_data last;
1326 struct logger_data logger;
1327 struct lsof_data lsof;
1328 struct mke2fs_data mke2fs;
1329 struct modprobe_data modprobe;
1330 struct more_data more;
1331 struct netstat_data netstat;
1332 struct openvt_data openvt;
1333 struct pgrep_data pgrep;
1334 struct ping_data ping;
1335 struct route_data route;
1337 struct sulogin_data sulogin;
1338 struct syslogd_data syslogd;
1339 struct tar_data tar;
1340 struct tcpsvd_data tcpsvd;
1341 struct telnet_data telnet;
1342 struct telnetd_data telnetd;
1343 struct tftp_data tftp;
1344 struct tftpd_data tftpd;
1345 struct top_data top;
1347 struct traceroute_data traceroute;
1348 struct useradd_data useradd;
1349 struct watch_data watch;
1350 struct chgrp_data chgrp;
1351 struct chmod_data chmod;
1352 struct cksum_data cksum;
1353 struct cmp_data cmp;
1355 struct cpio_data cpio;
1356 struct cut_data cut;
1357 struct date_data date;
1360 struct expand_data expand;
1361 struct find_data find;
1362 struct grep_data grep;
1363 struct head_data head;
1365 struct kill_data kill;
1367 struct mkdir_data mkdir;
1368 struct mkfifo_data mkfifo;
1369 struct nice_data nice;
1372 struct paste_data paste;
1373 struct patch_data patch;
1375 struct renice_data renice;
1376 struct sed_data sed;
1377 struct sort_data sort;
1378 struct split_data split;
1379 struct strings_data strings;
1380 struct tail_data tail;
1381 struct tee_data tee;
1382 struct touch_data touch;
1383 struct uniq_data uniq;
1384 struct uudecode_data uudecode;
1386 struct xargs_data xargs;