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/dhcpd.c
457 // toys/pending/diff.c
462 struct arg_list *L_list;
464 int dir_num, size, is_binary, status, change, len[2];
468 // toys/pending/dumpleases.c
470 struct dumpleases_data {
474 // toys/pending/expr.c
480 // toys/pending/fdisk.c
489 // toys/pending/fold.c
495 // toys/pending/fsck.c
501 struct double_list *devices;
511 // toys/pending/ftpget.c
514 long port; // char *port;
521 char buf[sizeof(struct sockaddr_storage)];
524 // toys/pending/getty.c
536 struct termios termios;
540 // toys/pending/groupadd.c
542 struct groupadd_data {
546 // toys/pending/host.c
552 // toys/pending/iconv.c
564 char stats, singleline, flush, *filter_dev, gbuf[8192];
565 int sockfd, connected, from_ok, route_cmd;
566 int8_t addressfamily, is_addr;
569 // toys/pending/ipcrm.c
572 struct arg_list *qkey;
573 struct arg_list *qid;
574 struct arg_list *skey;
575 struct arg_list *sid;
576 struct arg_list *mkey;
577 struct arg_list *mid;
580 // toys/pending/ipcs.c
586 // toys/pending/klogd.c
594 // toys/pending/last.c
599 struct arg_list *list;
602 // toys/pending/logger.c
609 // toys/pending/lsof.c
614 struct stat *sought_files;
616 struct double_list *files;
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/netstat.c
670 struct netstat_data {
671 char current_name[21];
672 int some_process_unidentified;
675 // toys/pending/openvt.c
678 unsigned long vt_num;
681 // toys/pending/pgrep.c
690 // toys/pending/ping.c
717 long pidlen, *pids, ttylen, *ttys, bits;
721 // toys/pending/route.c
733 // toys/pending/sulogin.c
735 struct sulogin_data {
737 struct termios crntio;
740 // toys/pending/syslogd.c
742 struct syslogd_data {
753 struct unsocks *lsocks; // list of listen sockets
754 struct logfile *lfiles; // list of write logfiles
758 // toys/pending/tar.c
763 struct arg_list *inc_file;
764 struct arg_list *exc_file;
766 struct arg_list *exc;
768 struct arg_list *inc, *pass;
769 void *inodes, *handle;
772 // toys/pending/tcpsvd.c
786 // toys/pending/telnet.c
796 struct termios def_term;
797 struct termios raw_term;
805 // toys/pending/telnetd.c
807 struct telnetd_data {
818 // toys/pending/tftp.c
825 struct sockaddr_storage inaddr;
829 // toys/pending/tftpd.c
838 // toys/pending/top.c
858 short map[256]; //map of chars
862 // toys/pending/traceroute.c
864 struct traceroute_data {
871 struct arg_list *loose_source;
885 // toys/pending/useradd.c
887 struct useradd_data {
897 // toys/pending/watch.c
903 // toys/posix/chgrp.c
908 char *owner_name, *group_name;
912 // toys/posix/chmod.c
918 // toys/posix/cksum.c
921 unsigned crc_table[256];
948 int (*callback)(struct dirtree *try);
972 void (*do_cut)(int fd);
989 struct arg_list *fstype;
992 int column_widths[5];
1006 // toys/posix/expand.c
1008 struct expand_data {
1009 struct arg_list *tabs;
1011 unsigned tabcount, *tab;
1014 // toys/posix/find.c
1018 struct double_list *argdata;
1019 int topdir, xdev, depth, envsize;
1023 // toys/posix/grep.c
1030 struct arg_list *regex;
1033 // toys/posix/head.c
1046 // toys/posix/kill.c
1050 struct arg_list *olist;
1058 struct dirtree *files, *singledir;
1060 unsigned screen_width;
1062 char uid_buf[12], gid_buf[12];
1065 // toys/posix/mkdir.c
1072 // toys/posix/mkfifo.c
1074 struct mkfifo_data {
1081 // toys/posix/nice.c
1097 // Count of consecutive blank lines for -l has to persist between files
1104 struct arg_list *output_base;
1110 unsigned types, leftover, star;
1112 uint64_t bufs[4]; // force 64-bit alignment
1116 // toys/posix/paste.c
1122 // toys/posix/patch.c
1128 struct double_list *current_hunk;
1129 long oldline, oldlen, newline, newlen;
1131 int context, state, filein, fileout, filepatch, hunknum;
1135 // toys/posix/renice.c
1137 struct renice_data {
1147 // processed pattern list
1148 struct double_list *pattern;
1150 char *nextline, *remember;
1151 void *restart, *lastregex;
1152 long nextlen, rememberlen, count;
1157 // toys/posix/sort.c
1160 char *key_separator;
1161 struct arg_list *raw_keys;
1163 char *ignore1, ignore2; // GNU compatability NOPs for -S and -T.
1170 // toys/posix/split.c
1180 // toys/posix/strings.c
1182 struct strings_data {
1186 // toys/posix/tail.c
1201 // toys/posix/touch.c
1209 // toys/posix/uniq.c
1218 // toys/posix/uudecode.c
1220 struct uudecode_data {
1227 unsigned long totals[3];
1230 // toys/posix/xargs.c
1239 long entries, bytes;
1243 extern union global_union {
1244 struct getprop_data getprop;
1245 struct hello_data hello;
1246 struct skeleton_data skeleton;
1247 struct dmesg_data dmesg;
1248 struct killall_data killall;
1249 struct md5sum_data md5sum;
1250 struct mknod_data mknod;
1251 struct mktemp_data mktemp;
1252 struct mount_data mount;
1253 struct passwd_data passwd;
1254 struct pidof_data pidof;
1255 struct seq_data seq;
1257 struct umount_data umount;
1258 struct acpi_data acpi;
1259 struct base64_data base64;
1260 struct blockdev_data blockdev;
1261 struct dos2unix_data dos2unix;
1262 struct fallocate_data fallocate;
1263 struct free_data free;
1264 struct hexedit_data hexedit;
1265 struct hwclock_data hwclock;
1266 struct ifconfig_data ifconfig;
1267 struct ionice_data ionice;
1268 struct login_data login;
1269 struct losetup_data losetup;
1270 struct lspci_data lspci;
1271 struct makedevs_data makedevs;
1272 struct mix_data mix;
1273 struct mkpasswd_data mkpasswd;
1274 struct modinfo_data modinfo;
1275 struct netcat_data netcat;
1276 struct nsenter_data nsenter;
1277 struct oneit_data oneit;
1278 struct shred_data shred;
1279 struct stat_data stat;
1280 struct swapon_data swapon;
1281 struct switch_root_data switch_root;
1282 struct timeout_data timeout;
1283 struct truncate_data truncate;
1284 struct xxd_data xxd;
1285 struct arp_data arp;
1286 struct arping_data arping;
1287 struct bootchartd_data bootchartd;
1288 struct brctl_data brctl;
1289 struct compress_data compress;
1290 struct crond_data crond;
1291 struct crontab_data crontab;
1293 struct dhcp_data dhcp;
1294 struct dhcpd_data dhcpd;
1295 struct diff_data diff;
1296 struct dumpleases_data dumpleases;
1297 struct expr_data expr;
1298 struct fdisk_data fdisk;
1299 struct fold_data fold;
1300 struct fsck_data fsck;
1301 struct ftpget_data ftpget;
1302 struct getty_data getty;
1303 struct groupadd_data groupadd;
1304 struct host_data host;
1305 struct iconv_data iconv;
1307 struct ipcrm_data ipcrm;
1308 struct ipcs_data ipcs;
1309 struct klogd_data klogd;
1310 struct last_data last;
1311 struct logger_data logger;
1312 struct lsof_data lsof;
1313 struct mke2fs_data mke2fs;
1314 struct modprobe_data modprobe;
1315 struct more_data more;
1316 struct netstat_data netstat;
1317 struct openvt_data openvt;
1318 struct pgrep_data pgrep;
1319 struct ping_data ping;
1321 struct route_data route;
1323 struct sulogin_data sulogin;
1324 struct syslogd_data syslogd;
1325 struct tar_data tar;
1326 struct tcpsvd_data tcpsvd;
1327 struct telnet_data telnet;
1328 struct telnetd_data telnetd;
1329 struct tftp_data tftp;
1330 struct tftpd_data tftpd;
1331 struct top_data top;
1333 struct traceroute_data traceroute;
1334 struct useradd_data useradd;
1335 struct watch_data watch;
1336 struct chgrp_data chgrp;
1337 struct chmod_data chmod;
1338 struct cksum_data cksum;
1339 struct cmp_data cmp;
1341 struct cpio_data cpio;
1342 struct cut_data cut;
1343 struct date_data date;
1346 struct expand_data expand;
1347 struct find_data find;
1348 struct grep_data grep;
1349 struct head_data head;
1351 struct kill_data kill;
1353 struct mkdir_data mkdir;
1354 struct mkfifo_data mkfifo;
1355 struct nice_data nice;
1358 struct paste_data paste;
1359 struct patch_data patch;
1360 struct renice_data renice;
1361 struct sed_data sed;
1362 struct sort_data sort;
1363 struct split_data split;
1364 struct strings_data strings;
1365 struct tail_data tail;
1366 struct tee_data tee;
1367 struct touch_data touch;
1368 struct uniq_data uniq;
1369 struct uudecode_data uudecode;
1371 struct xargs_data xargs;