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;
371 unsigned long start, end;
372 unsigned sent_at, sent_nr, rcvd_nr, brd_sent, rcvd_req, brd_rcv,
376 // toys/pending/bootchartd.c
378 struct bootchartd_data {
380 long smpl_period_usec;
387 // toys/pending/brctl.c
393 // toys/pending/compress.c
395 struct compress_data {
396 // Huffman codes: base offset and extra bits tables (length and distance)
397 char lenbits[29], distbits[30];
398 unsigned short lenbase[29], distbase[30];
399 void *fixdisthuff, *fixlithuff;
402 void (*crcfunc)(char *data, int len);
405 // Compressed data buffer
410 // Tables only used for deflation
411 unsigned short *hashhead, *hashchain;
414 // toys/pending/crond.c
422 time_t crontabs_dir_mtime;
426 // toys/pending/crontab.c
428 struct crontab_data {
439 // toys/pending/dhcp.c
448 struct arg_list *req_opt;
450 struct arg_list *pkt_opt;
456 // toys/pending/dhcpd.c
463 // toys/pending/diff.c
468 struct arg_list *L_list;
470 int dir_num, size, is_binary, status, change, len[2];
474 // toys/pending/dumpleases.c
476 struct dumpleases_data {
480 // toys/pending/expr.c
486 // toys/pending/fdisk.c
495 // toys/pending/fold.c
501 // toys/pending/fsck.c
507 struct double_list *devices;
517 // toys/pending/ftpget.c
520 long port; // char *port;
527 char buf[sizeof(struct sockaddr_storage)];
530 // toys/pending/getty.c
542 struct termios termios;
546 // toys/pending/groupadd.c
548 struct groupadd_data {
552 // toys/pending/host.c
558 // toys/pending/iconv.c
570 char stats, singleline, flush, *filter_dev, gbuf[8192];
571 int sockfd, connected, from_ok, route_cmd;
572 int8_t addressfamily, is_addr;
575 // toys/pending/ipcrm.c
578 struct arg_list *qkey;
579 struct arg_list *qid;
580 struct arg_list *skey;
581 struct arg_list *sid;
582 struct arg_list *mkey;
583 struct arg_list *mid;
586 // toys/pending/ipcs.c
592 // toys/pending/klogd.c
600 // toys/pending/last.c
605 struct arg_list *list;
608 // toys/pending/logger.c
615 // toys/pending/lsof.c
620 struct stat *sought_files;
622 struct double_list *files;
627 // toys/pending/mke2fs.c
630 // Command line arguments.
632 long bytes_per_inode;
633 long inodes; // Total inodes in filesystem.
634 long reserved_percent; // Integer precent of space to reserve for root.
635 char *gendir; // Where to read dirtree from.
638 struct dirtree *dt; // Tree of files to copy into the new filesystem.
639 unsigned treeblocks; // Blocks used by dt
640 unsigned treeinodes; // Inodes used by dt
642 unsigned blocks; // Total blocks in the filesystem.
643 unsigned freeblocks; // Free blocks in the filesystem.
644 unsigned inodespg; // Inodes per group
645 unsigned groups; // Total number of block groups.
646 unsigned blockbits; // Bits per block. (Also blocks per group.)
649 unsigned nextblock; // Next data block to allocate
650 unsigned nextgroup; // Next group we'll be allocating from
651 int fsfd; // File descriptor of filesystem (to output to).
653 struct ext2_superblock sb;
656 // toys/pending/modprobe.c
658 struct modprobe_data {
659 struct arg_list *probes;
660 struct arg_list *dbase[256];
664 void (*dbg)(char *format, ...);
667 // toys/pending/more.c
674 // toys/pending/netstat.c
676 struct netstat_data {
677 char current_name[21];
678 int some_process_unidentified;
681 // toys/pending/openvt.c
684 unsigned long vt_num;
687 // toys/pending/pgrep.c
695 // toys/pending/ping.c
719 // toys/pending/route.c
731 // toys/pending/sulogin.c
733 struct sulogin_data {
735 struct termios crntio;
738 // toys/pending/syslogd.c
740 struct syslogd_data {
751 struct unsocks *lsocks; // list of listen sockets
752 struct logfile *lfiles; // list of write logfiles
756 // toys/pending/tar.c
761 struct arg_list *inc_file;
762 struct arg_list *exc_file;
764 struct arg_list *exc;
766 struct arg_list *inc, *pass;
767 void *inodes, *handle;
770 // toys/pending/tcpsvd.c
784 // toys/pending/telnet.c
794 struct termios def_term;
795 struct termios raw_term;
803 // toys/pending/telnetd.c
805 struct telnetd_data {
816 // toys/pending/tftp.c
823 struct sockaddr_storage inaddr;
827 // toys/pending/tftpd.c
836 // toys/pending/top.c
856 short map[256]; //map of chars
860 // toys/pending/traceroute.c
862 struct traceroute_data {
869 struct arg_list *loose_source;
883 // toys/pending/useradd.c
885 struct useradd_data {
895 // toys/pending/watch.c
901 // toys/posix/chgrp.c
906 char *owner_name, *group_name;
910 // toys/posix/chmod.c
916 // toys/posix/cksum.c
919 unsigned crc_table[256];
946 int (*callback)(struct dirtree *try);
970 void (*do_cut)(int fd);
987 struct arg_list *fstype;
1002 // toys/posix/expand.c
1004 struct expand_data {
1005 struct arg_list *tabs;
1007 unsigned tabcount, *tab;
1010 // toys/posix/find.c
1014 struct double_list *argdata;
1015 int topdir, xdev, depth, envsize;
1019 // toys/posix/grep.c
1026 struct arg_list *regex;
1029 // toys/posix/head.c
1042 // toys/posix/kill.c
1046 struct arg_list *olist;
1054 struct dirtree *files, *singledir;
1056 unsigned screen_width;
1058 char uid_buf[12], gid_buf[12];
1061 // toys/posix/mkdir.c
1068 // toys/posix/mkfifo.c
1070 struct mkfifo_data {
1077 // toys/posix/nice.c
1093 // Count of consecutive blank lines for -l has to persist between files
1100 struct arg_list *output_base;
1106 unsigned types, leftover, star;
1108 uint64_t bufs[4]; // force 64-bit alignment
1112 // toys/posix/paste.c
1118 // toys/posix/patch.c
1124 struct double_list *current_hunk;
1125 long oldline, oldlen, newline, newlen;
1127 int context, state, filein, fileout, filepatch, hunknum;
1131 // toys/posix/renice.c
1133 struct renice_data {
1143 // processed pattern list
1144 struct double_list *pattern;
1146 char *nextline, *remember;
1147 void *restart, *lastregex;
1148 long nextlen, rememberlen, count;
1153 // toys/posix/sort.c
1156 char *key_separator;
1157 struct arg_list *raw_keys;
1159 char *ignore1, ignore2; // GNU compatability NOPs for -S and -T.
1166 // toys/posix/split.c
1176 // toys/posix/strings.c
1178 struct strings_data {
1182 // toys/posix/tail.c
1197 // toys/posix/touch.c
1205 // toys/posix/uniq.c
1214 // toys/posix/uudecode.c
1216 struct uudecode_data {
1223 unsigned long totals[3];
1226 // toys/posix/xargs.c
1235 long entries, bytes;
1239 extern union global_union {
1240 struct getprop_data getprop;
1241 struct hello_data hello;
1242 struct skeleton_data skeleton;
1243 struct dmesg_data dmesg;
1244 struct killall_data killall;
1245 struct md5sum_data md5sum;
1246 struct mknod_data mknod;
1247 struct mktemp_data mktemp;
1248 struct mount_data mount;
1249 struct passwd_data passwd;
1250 struct pidof_data pidof;
1251 struct seq_data seq;
1253 struct umount_data umount;
1254 struct acpi_data acpi;
1255 struct base64_data base64;
1256 struct blockdev_data blockdev;
1257 struct dos2unix_data dos2unix;
1258 struct fallocate_data fallocate;
1259 struct free_data free;
1260 struct hexedit_data hexedit;
1261 struct hwclock_data hwclock;
1262 struct ifconfig_data ifconfig;
1263 struct ionice_data ionice;
1264 struct login_data login;
1265 struct losetup_data losetup;
1266 struct lspci_data lspci;
1267 struct makedevs_data makedevs;
1268 struct mix_data mix;
1269 struct mkpasswd_data mkpasswd;
1270 struct modinfo_data modinfo;
1271 struct netcat_data netcat;
1272 struct nsenter_data nsenter;
1273 struct oneit_data oneit;
1274 struct shred_data shred;
1275 struct stat_data stat;
1276 struct swapon_data swapon;
1277 struct switch_root_data switch_root;
1278 struct taskset_data taskset;
1279 struct timeout_data timeout;
1280 struct truncate_data truncate;
1281 struct xxd_data xxd;
1282 struct arp_data arp;
1283 struct arping_data arping;
1284 struct bootchartd_data bootchartd;
1285 struct brctl_data brctl;
1286 struct compress_data compress;
1287 struct crond_data crond;
1288 struct crontab_data crontab;
1290 struct dhcp_data dhcp;
1291 struct dhcpd_data dhcpd;
1292 struct diff_data diff;
1293 struct dumpleases_data dumpleases;
1294 struct expr_data expr;
1295 struct fdisk_data fdisk;
1296 struct fold_data fold;
1297 struct fsck_data fsck;
1298 struct ftpget_data ftpget;
1299 struct getty_data getty;
1300 struct groupadd_data groupadd;
1301 struct host_data host;
1302 struct iconv_data iconv;
1304 struct ipcrm_data ipcrm;
1305 struct ipcs_data ipcs;
1306 struct klogd_data klogd;
1307 struct last_data last;
1308 struct logger_data logger;
1309 struct lsof_data lsof;
1310 struct mke2fs_data mke2fs;
1311 struct modprobe_data modprobe;
1312 struct more_data more;
1313 struct netstat_data netstat;
1314 struct openvt_data openvt;
1315 struct pgrep_data pgrep;
1316 struct ping_data ping;
1318 struct route_data route;
1320 struct sulogin_data sulogin;
1321 struct syslogd_data syslogd;
1322 struct tar_data tar;
1323 struct tcpsvd_data tcpsvd;
1324 struct telnet_data telnet;
1325 struct telnetd_data telnetd;
1326 struct tftp_data tftp;
1327 struct tftpd_data tftpd;
1328 struct top_data top;
1330 struct traceroute_data traceroute;
1331 struct useradd_data useradd;
1332 struct watch_data watch;
1333 struct chgrp_data chgrp;
1334 struct chmod_data chmod;
1335 struct cksum_data cksum;
1336 struct cmp_data cmp;
1338 struct cpio_data cpio;
1339 struct cut_data cut;
1340 struct date_data date;
1343 struct expand_data expand;
1344 struct find_data find;
1345 struct grep_data grep;
1346 struct head_data head;
1348 struct kill_data kill;
1350 struct mkdir_data mkdir;
1351 struct mkfifo_data mkfifo;
1352 struct nice_data nice;
1355 struct paste_data paste;
1356 struct patch_data patch;
1357 struct renice_data renice;
1358 struct sed_data sed;
1359 struct sort_data sort;
1360 struct split_data split;
1361 struct strings_data strings;
1362 struct tail_data tail;
1363 struct tee_data tee;
1364 struct touch_data touch;
1365 struct uniq_data uniq;
1366 struct uudecode_data uudecode;
1368 struct xargs_data xargs;