diff --git a/kconfig/lxdialog/menubox.c b/kconfig/lxdialog/menubox.c index 0d83159d9..4d23b46a8 100644 --- a/kconfig/lxdialog/menubox.c +++ b/kconfig/lxdialog/menubox.c @@ -305,7 +305,7 @@ int dialog_menu(const char *title, const char *prompt, key == KEY_UP || key == KEY_DOWN || key == '-' || key == '+' || key == KEY_PPAGE || key == KEY_NPAGE) { - /* Remove highligt of current item */ + /* Remove highlight of current item */ print_item(scroll + choice, choice, FALSE); if (key == KEY_UP || key == '-') { diff --git a/kconfig/lxdialog/util.c b/kconfig/lxdialog/util.c index ebc781b49..08cf00225 100644 --- a/kconfig/lxdialog/util.c +++ b/kconfig/lxdialog/util.c @@ -483,7 +483,7 @@ int first_alpha(const char *string, const char *exempt) * lxdialog suggest which is correctly translated to two * times esc. But then we need to ignore the second esc to avoid stepping * out one menu too much. Filter away all escaped key sequences since - * keypad(FALSE) turn off ncurses support for escape sequences - and thats + * keypad(FALSE) turn off ncurses support for escape sequences - and that's * needed to make notimeout() do as expected. */ int on_key_esc(WINDOW *win) diff --git a/kconfig/util.c b/kconfig/util.c index e3f28b9d5..dba6ffc28 100644 --- a/kconfig/util.c +++ b/kconfig/util.c @@ -53,7 +53,7 @@ int file_write_dep(const char *name) } -/* Allocate initial growable sting */ +/* Allocate initial growable string */ struct gstr str_new(void) { struct gstr gs; diff --git a/lib/env.c b/lib/env.c index facde63fc..6ab7dbacc 100644 --- a/lib/env.c +++ b/lib/env.c @@ -1,4 +1,4 @@ -// Can't trust libc not to leak enviornment variable memory, so... +// Can't trust libc not to leak environment variable memory, so... #include "toys.h" diff --git a/lib/lib.c b/lib/lib.c index 49fd5dd2c..49834632e 100644 --- a/lib/lib.c +++ b/lib/lib.c @@ -1055,7 +1055,7 @@ void mode_to_string(mode_t mode, char *buf) } // basename() can modify its argument or return a pointer to a constant string -// This just gives after the last '/' or the whole stirng if no / +// This just gives after the last '/' or the whole string if no / char *getbasename(char *name) { char *s = strrchr(name, '/'); diff --git a/lib/linestack.c b/lib/linestack.c index e6ae1b57d..7cfb70673 100644 --- a/lib/linestack.c +++ b/lib/linestack.c @@ -1,7 +1,7 @@ #include "toys.h" // The design idea here is indexing a big blob of (potentially mmaped) data -// instead of copying the data into a zillion seperate malloc()s. +// instead of copying the data into a zillion separate malloc()s. // A linestack is an array of struct ptr_len, with a currently used len // and max tracking the memory allocation. This indexes existing string data, diff --git a/lib/tty.c b/lib/tty.c index d7e0f47f4..06a211b72 100644 --- a/lib/tty.c +++ b/lib/tty.c @@ -46,7 +46,7 @@ int terminal_size(unsigned *xx, unsigned *yy) return x || y; } -// Query terminal size, sending ANSI probe if necesary. (Probe queries xterm +// Query terminal size, sending ANSI probe if necessary. (Probe queries xterm // size through serial connection, when local TTY doesn't know but remote does.) // Returns 0 if ANSI probe sent, 1 if size determined from tty or environment diff --git a/tests/readelf.test b/tests/readelf.test index 1e85e45e2..9f646034d 100755 --- a/tests/readelf.test +++ b/tests/readelf.test @@ -104,7 +104,7 @@ Program Headers: " "" "" # binutils doesn't line up the column headers for 64-bit ELF files. -# TODO: binutils readelf lies about trailing NULL entires binutils ld produces +# TODO: binutils readelf lies about trailing NULL entries binutils ld produces NOSPACE=1 toyonly testing "-d" "readelf -dW $elf-full" " Dynamic section at offset 0xd98 contains 33 entries: Tag Type Name/Value diff --git a/tests/sh.test b/tests/sh.test index 947e3ae7b..6b378eb3f 100644 --- a/tests/sh.test +++ b/tests/sh.test @@ -9,7 +9,7 @@ # // ${#} ${#x} ${#@} ${#x[@]} ${#!} ${!#} # // ${!} ${!@} ${!@Q} ${!x} ${!x@} ${!x@Q} ${!x#} ${!x[} ${!x[*]} -# Looked like a prefix but wasn't: three chars (@ # -) are both paremeter name +# Looked like a prefix but wasn't: three chars (@ # -) are both parameter name # and slice operator. When immediately followed by } it's parameter, otherwise # we did NOT have a prefix and it's an operator. # diff --git a/toys/lsb/mount.c b/toys/lsb/mount.c index 8ff084cfe..0fb6fa3c4 100644 --- a/toys/lsb/mount.c +++ b/toys/lsb/mount.c @@ -42,7 +42,7 @@ config MOUNT # helo # usage: smbmount SHARE DIR # -# Mount smb share with user/pasword prompt as necessary. +# Mount smb share with user/password prompt as necessary. # #config NFSMOUNT # bool "nfsmount" @@ -309,7 +309,7 @@ void mount_main(void) for (ss = toys.optargs; *ss; ss++) { char *sss = *ss; - // If you realy, really want to mount a file named "--", we support it. + // If you really, really want to mount a file named "--", we support it. if (sss[0]=='-' && sss[1]=='-' && sss[2]) comma_collate(&opts, sss+2); else if (!dev) dev = sss; else if (!dir) dir = sss; diff --git a/toys/net/netcat.c b/toys/net/netcat.c index 2d80a18f5..8dd20f245 100644 --- a/toys/net/netcat.c +++ b/toys/net/netcat.c @@ -98,7 +98,7 @@ void netcat_main(void) ll = FLAG(L)|FLAG(l), type = FLAG(u) ? SOCK_DGRAM : SOCK_STREAM; pid_t child; - // Addjust idle and quit_delay to ms or -1 for no timeout + // Adjust idle and quit_delay to ms or -1 for no timeout TT.W = TT.W ? TT.W*1000 : -1; TT.q = TT.q ? TT.q*1000 : -1; diff --git a/toys/net/netstat.c b/toys/net/netstat.c index 7eed02da7..46ae878fc 100644 --- a/toys/net/netstat.c +++ b/toys/net/netstat.c @@ -58,7 +58,7 @@ static void addr2str(int af, void *addr, unsigned port, char *buf, int len, socklen_t sock_len = (af == AF_INET) ? sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6); - // We assume that a failing getnameinfo dosn't stomp "buf" here. + // We assume that a failing getnameinfo doesn't stomp "buf" here. for (rp = result; rp; rp = rp->ai_next) if (!getnameinfo(rp->ai_addr, sock_len, buf, 256, 0, 0, 0)) break; freeaddrinfo(result); diff --git a/toys/net/ping.c b/toys/net/ping.c index 018e8870b..06a352d4b 100644 --- a/toys/net/ping.c +++ b/toys/net/ping.c @@ -214,7 +214,7 @@ void ping_main(void) if (TT.w) tw = TT.w*1000+tnext; memset(&msg, 0, sizeof(msg)); - // left enought space to store ttl value + // left enough space to store ttl value len = CMSG_SPACE(sizeof(uint8_t)); iov.iov_base = (void *)toybuf; iov.iov_len = sizeof(toybuf) - len; diff --git a/toys/other/blkdiscard.c b/toys/other/blkdiscard.c index 862e4fed1..6d09245ee 100644 --- a/toys/other/blkdiscard.c +++ b/toys/other/blkdiscard.c @@ -6,7 +6,7 @@ * * The -v and -p options are not supported. * Size parsing does not match util-linux where MB, GB, TB are multiples of - * 1000 and MiB, TiB, GiB are multipes of 1024. + * 1000 and MiB, TiB, GiB are multiples of 1024. USE_BLKDISCARD(NEWTOY(blkdiscard, "<1>1f(force)l(length)#<0o(offset)#<0s(secure)z(zeroout)[!sz]", TOYFLAG_BIN)) diff --git a/toys/other/bzcat.c b/toys/other/bzcat.c index f7453441e..d6a6bfb6f 100644 --- a/toys/other/bzcat.c +++ b/toys/other/bzcat.c @@ -151,7 +151,7 @@ static unsigned int get_bits(struct bunzip_data *bd, char bits_wanted) * 16 bits : Mapping table index. *[16 bits]: symToByte[symTotal] (Mapping table. For each bit set in mapping * table index above, read another 16 bits of mapping table data. - * If correspondig bit is unset, all bits in that mapping table + * If corresponding bit is unset, all bits in that mapping table * section are 0.) * 3 bits : groupCount (how many huffman tables used to encode, anywhere * from 2 to MAX_GROUPS) diff --git a/toys/other/free.c b/toys/other/free.c index 6be1cdca3..5046f3c58 100644 --- a/toys/other/free.c +++ b/toys/other/free.c @@ -2,7 +2,7 @@ * * Copyright 2012 Elie De Brauwer -// Flag order is signifcant: b-g are units in order, FLAG_h-1 is unit mask +// Flag order is significant: b-g are units in order, FLAG_h-1 is unit mask USE_FREE(NEWTOY(free, "hgmkb[!hgmkb]", TOYFLAG_USR|TOYFLAG_BIN)) config FREE diff --git a/toys/other/inotifyd.c b/toys/other/inotifyd.c index 42d1d76e7..67ba66fb3 100644 --- a/toys/other/inotifyd.c +++ b/toys/other/inotifyd.c @@ -86,7 +86,7 @@ void inotifyd_main(void) int left = len - (((char *)event)-(char *)buf), size = sizeof(struct inotify_event); - // Don't dereference event if ->len is off end of bufer + // Don't dereference event if ->len is off end of buffer if (left >= size) size += event->len; if (left < size) break; diff --git a/toys/other/which.c b/toys/other/which.c index fc65fe8ae..abd1cc51d 100644 --- a/toys/other/which.c +++ b/toys/other/which.c @@ -16,7 +16,7 @@ config WHICH */ #include "toys.h" -// Find an exectuable file either at a path with a slash in it (absolute or +// Find an executable file either at a path with a slash in it (absolute or // relative to current directory), or in $PATH. Returns absolute path to file, // or NULL if not found. diff --git a/toys/pending/arp.c b/toys/pending/arp.c index eaecfc718..54044f3e4 100644 --- a/toys/pending/arp.c +++ b/toys/pending/arp.c @@ -239,7 +239,7 @@ void arp_main(void) if ((toys.optflags & FLAG_s) && !set_entry()) return; if ((toys.optflags & FLAG_d) && !delete_entry()) return; - //show arp chache + //show arp cache fd = xopenro("/proc/net/arp"); buf = get_line(fd); free(buf); //skip first line diff --git a/toys/pending/dhcp.c b/toys/pending/dhcp.c index 43e29423b..42aef67e8 100644 --- a/toys/pending/dhcp.c +++ b/toys/pending/dhcp.c @@ -314,7 +314,7 @@ static int get_interface( char *interface, int *ifindex, uint32_t *oip, uint8_t /* *logs messeges to syslog or console *opening the log is still left with applet. - *FIXME: move to more relevent lib. probably libc.c + *FIXME: move to more relevant lib. probably libc.c */ static void infomsg(uint8_t infomode, char *s, ...) { @@ -341,7 +341,7 @@ static void infomsg(uint8_t infomode, char *s, ...) /* * Writes self PID in file PATH * FIXME: libc implementation only writes in /var/run - * this is more generic as some implemenation may provide + * this is more generic as some implementation may provide * arguments to write in specific file. as dhcpd does. */ static void write_pid(char *path) @@ -356,7 +356,7 @@ static void write_pid(char *path) } } -// String STR to UINT32 conversion strored in VAR +// String STR to UINT32 conversion stored in VAR static long strtou32( char *str) { char *endptr = NULL; @@ -624,7 +624,7 @@ static int mode_app(void) } setsockopt(state->sockfd, SOL_SOCKET, SO_REUSEADDR, &set, sizeof(set)); if (setsockopt(state->sockfd, SOL_SOCKET, SO_BROADCAST, &set, sizeof(set)) == -1) { - dbg("MODE APP : brodcast failed.\n"); + dbg("MODE APP : broadcast failed.\n"); close(state->sockfd); return -1; } diff --git a/toys/pending/dhcpd.c b/toys/pending/dhcpd.c index c5125e715..502b1c66b 100644 --- a/toys/pending/dhcpd.c +++ b/toys/pending/dhcpd.c @@ -429,7 +429,7 @@ static int get_interface(const char *interface, int *ifindex, void *oip, /* *logs messeges to syslog or console *opening the log is still left with applet. - *FIXME: move to more relevent lib. probably libc.c + *FIXME: move to more relevant lib. probably libc.c */ static void infomsg(uint8_t infomode, char *s, ...) { @@ -456,7 +456,7 @@ static void infomsg(uint8_t infomode, char *s, ...) /* * Writes self PID in file PATH * FIXME: libc implementation only writes in /var/run - * this is more generic as some implemenation may provide + * this is more generic as some implementation may provide * arguments to write in specific file. as dhcpd does. */ static void write_pid(char *path) @@ -494,7 +494,7 @@ static int setup_signal() return 0; } -// String STR to UINT32 conversion strored in VAR +// String STR to UINT32 conversion stored in VAR static int strtou32(const char *str, void *var) { char *endptr = NULL; @@ -830,7 +830,7 @@ static int open_listensock(void) gstate.listensock = xsocket(PF_INET, SOCK_DGRAM, IPPROTO_UDP); setsockopt(gstate.listensock, SOL_SOCKET, SO_REUSEADDR, &constone, sizeof(constone)); if (setsockopt(gstate.listensock, SOL_SOCKET, SO_BROADCAST, &constone, sizeof(constone)) == -1) { - error_msg("failed to receive brodcast packets.\n"); + error_msg("failed to receive broadcast packets.\n"); close(gstate.listensock); return -1; } @@ -1125,7 +1125,7 @@ static uint8_t* get_optval6(uint8_t *optptr, uint16_t opt, uint16_t *datalen, vo return optptr; } -// Retrives Requested Parameter list from dhcp req packet. +// Retrieves Requested Parameter list from dhcp req packet. static uint8_t get_reqparam(uint8_t **list) { uint8_t len, *optptr; diff --git a/toys/pending/diff.c b/toys/pending/diff.c index e93c622c0..91dbc5962 100644 --- a/toys/pending/diff.c +++ b/toys/pending/diff.c @@ -147,7 +147,7 @@ static void free_candidates(struct candidate *c) * 2.b. if s = k (fence reached move it further) do K[k + 2] = K[k + 1], k++ * 3. if E[p].last true break i.e we have reached at the end of an equiv class * else p = p + 1 //keep traversing the equiv class. - * 4. K[r] = c //Save the sucessfully filled k-candidate. + * 4. K[r] = c //Save the successfully filled k-candidate. */ static void do_merge(struct candidate **K, int *k, int i, struct v_vector *E, int p) @@ -249,13 +249,13 @@ int bcomp(const void *a, const void *b) /* file[0] corresponds file 1 and file[1] correspond file 2. * 1. calc hashes for both the files and store them in vector(v[0], v[1]) * 2. sort file[1] with hash as primary and serial as sec. key - * 3. Form the equivalance class of file[1] stored in e vector. It lists all the equivalence + * 3. Form the equivalence class of file[1] stored in e vector. It lists all the equivalence * classes of lines in file[1], with e.last = true on the last element of each class. * The elements are ordered by serial within classes. * 4. Form the p vector stored in p_vector. p_vector[i], if non-zero, now points in e vector * to the beginning of the equiv class of lines in file[1] equivalent to line * i in file[0]. - * 5. Form the k-candidates as discribed in do_merge. + * 5. Form the k-candidates as described in do_merge. * 6. Create a vector J[i] = j, such that i'th line in file[0] is j'th line of * file[1], i.e J comprises LCS */ @@ -866,7 +866,7 @@ void diff_main(void) && (S_ISDIR(TT.st[0].st_mode) || S_ISDIR(TT.st[1].st_mode))) error_exit("can't compare stdin to directory"); - if ((TT.st[0].st_ino == TT.st[1].st_ino) //physicaly same device + if ((TT.st[0].st_ino == TT.st[1].st_ino) //physically same device && (TT.st[0].st_dev == TT.st[1].st_dev)) { toys.exitval = 0; return show_status(files); diff --git a/toys/pending/expr.c b/toys/pending/expr.c index 9e094a75a..cdf2ef445 100644 --- a/toys/pending/expr.c +++ b/toys/pending/expr.c @@ -208,7 +208,7 @@ void eval_op(struct op_def *o, struct value *ret, struct value *rhs) } } -// Evalute a compound expression using recursive "Precedence Climbing" +// Evaluate a compound expression using recursive "Precedence Climbing" // algorithm, setting 'ret'. static void eval_expr(struct value *ret, int min_prec) { diff --git a/toys/pending/fdisk.c b/toys/pending/fdisk.c index c29a49ee2..916eb3505 100644 --- a/toys/pending/fdisk.c +++ b/toys/pending/fdisk.c @@ -230,7 +230,7 @@ static void read_geometry(struct hd_geometry *disk) } /* Read the extended boot record for the - * logical partion details. + * logical partition details. */ static void read_ebr(int idx) { @@ -263,7 +263,7 @@ static void read_ebr(int idx) close(dev_fd); error_exit("Couldn't read sector zero\n"); } - num_parts++; //extended partions present. + num_parts++; //extended partitions present. q = part_offset(sec_buf, 1); } while (!is_partition_clear(q) && IS_EXTENDED(q->sys_ind)); } @@ -315,7 +315,7 @@ static inline void write_table_flag(char *buf) } /* free the buffers used for holding details of - * extended logical partions + * extended logical partitions */ static void free_bufs(void) { @@ -374,7 +374,7 @@ static int read_mbr(char *device, int validate) total_number_sectors = read_size(); //Device size read_sec_sz(); sector_fac = g_sect_size/SECTOR_SIZE; //512 is hardware sector size. - physical_HS(&h, &s); //physical dimensions may be diferent from HDIO_GETGEO + physical_HS(&h, &s); //physical dimensions may be different from HDIO_GETGEO g_sectors = (FLAG(S) && TT.sectors) ? TT.sectors : s ? s : disk.sectors ? disk.sectors : 63; g_heads = (FLAG(H) && TT.heads) ? TT.heads : h ? h : disk.heads ? disk.heads : 255; g_cylinders = total_number_sectors/(g_heads * g_sectors * sector_fac); @@ -600,7 +600,7 @@ void delete_partition(int i) num_parts = 4; } else { //only logical is delete, need to move the rest of them backwards - if (i == 4) { //move partiton# 6 to 5. + if (i == 4) { //move partition# 6 to 5. partitions[i].modified = 1; if (num_parts > i+1) { q = partitions[i + 1].part; @@ -608,7 +608,7 @@ void delete_partition(int i) ext_p = part_offset(partitions[i].sec_buffer, 1); ext_q = part_offset(partitions[i + 1].sec_buffer, 1); *ext_p = *ext_q; //copy the extended info pointer - // change the start of the 4th partiton. + // change the start of the 4th partition. new_start = partitions[i + 1].start_offset + swap_le32toh(q->start4) - extended_offset; new_start = SWAP_LE32(new_start); memcpy(p->start4, (void *)&new_start, 4); @@ -721,7 +721,7 @@ static int get_free_partition(int max) return num; } -//taking user input for partition start/end sectors/cyinders +//taking user input for partition start/end sectors/cylinders static uint32_t ask_value(char *mesg, sector_t left, sector_t right, sector_t defalt) { char *str = toybuf; @@ -820,7 +820,7 @@ static sector_t ask_start_sector(int idx, sector_t* begin, sector_t* end, int ex if (disp_unit_cyl) limit = (sector_t)g_sectors * g_heads * g_cylinders - 1; else limit = total_number_sectors - 1; - if (disp_unit_cyl) //make the begin of every partition to cylnder boundary + if (disp_unit_cyl) //make the beginning of every partition to cylinder boundary for (i = 0; i < num_parts; i++) begin[i] = (begin[i]/(g_heads* g_sectors)) * (g_heads* g_sectors); @@ -873,7 +873,7 @@ static sector_t ask_end_sector(int idx, sector_t* begin, sector_t* end, int ext_ if (disp_unit_cyl) limit = (sector_t)g_sectors * g_heads * g_cylinders - 1; else limit = total_number_sectors - 1; - if (disp_unit_cyl) //make the begin of every partition to cylnder boundary + if (disp_unit_cyl) //make the beginning of every partition to cylinder boundary for (i = 0; i < num_parts; i++) begin[i] = (begin[i]/(g_heads* g_sectors)) * (g_heads* g_sectors); @@ -993,7 +993,7 @@ static void add_logical_partition(void) else add_partition(num_parts -1, LINUX_NATIVE); } -/* Add a new partiton to the partition table. +/* Add a new partition to the partition table. * MAX partitions limit is taken to be 60, can be changed */ static void add_new_partition(void) diff --git a/toys/pending/getty.c b/toys/pending/getty.c index 8c93a2501..0cba7c249 100644 --- a/toys/pending/getty.c +++ b/toys/pending/getty.c @@ -109,7 +109,7 @@ static void termios_init(void) if (tcsetattr(0, TCSANOW, &TT.termios) < 0) perror_exit("tcsetattr"); } -// Get the baud rate from modems CONNECT mesage, Its of form +// Get the baud rate from modems CONNECT message, It's of form static void sense_baud(void) { int vmin, speed; diff --git a/toys/pending/groupadd.c b/toys/pending/groupadd.c index 642b4a083..9364eeaf8 100644 --- a/toys/pending/groupadd.c +++ b/toys/pending/groupadd.c @@ -31,7 +31,7 @@ GLOBALS( ) /* Add a new group to the system, if GID is given then that is validated - * to be free, else a free GID is choosen by self. + * to be free, else a free GID is chosen by self. * SYSTEM IDs are considered in the range 100 ... 999 * update_group(), updates the entries in /etc/group, /etc/gshadow files */ diff --git a/toys/pending/init.c b/toys/pending/init.c index afc9a3ed6..a5e3d6aa1 100644 --- a/toys/pending/init.c +++ b/toys/pending/init.c @@ -31,7 +31,7 @@ struct action_list_seed { } *action_list_pointer = NULL; int caught_signal; -//INITTAB action defination +//INITTAB action definition #define SYSINIT 0x01 #define WAIT 0x02 #define ONCE 0x04 diff --git a/toys/pending/ip.c b/toys/pending/ip.c index d8c891a5a..70ad5cd25 100644 --- a/toys/pending/ip.c +++ b/toys/pending/ip.c @@ -835,7 +835,7 @@ static int print_link_output(struct linkdata *link) xputc('\n'); //user can specify stats flag two times - //one for stats and other for erros e.g. -s and -s -s + //one for stats and other for errors e.g. -s and -s -s print_stats(&link->rt_stat); free(flags); diff --git a/toys/pending/klogd.c b/toys/pending/klogd.c index 517edafd7..94bad2a51 100644 --- a/toys/pending/klogd.c +++ b/toys/pending/klogd.c @@ -1,4 +1,4 @@ -/* klogd.c - Klogd, The kernel log Dameon. +/* klogd.c - Klogd, The kernel log Daemon. * * Copyright 2013 Sandeep Sharma * Copyright 2013 Kyungwan Han diff --git a/toys/pending/mke2fs.c b/toys/pending/mke2fs.c index ee0a5b116..99e712063 100644 --- a/toys/pending/mke2fs.c +++ b/toys/pending/mke2fs.c @@ -79,7 +79,7 @@ GLOBALS( long blocksize; long bytes_per_inode; long inodes; // Total inodes in filesystem. - long reserved_percent; // Integer precent of space to reserve for root. + long reserved_percent; // Integer percent of space to reserve for root. char *gendir; // Where to read dirtree from. // Internal data. diff --git a/toys/pending/modprobe.c b/toys/pending/modprobe.c index a3f5bb9ed..61407fcb8 100644 --- a/toys/pending/modprobe.c +++ b/toys/pending/modprobe.c @@ -43,7 +43,7 @@ GLOBALS( #define DBASE_SIZE 256 #define MODNAME_LEN 256 -// Modules flag definations +// Modules flag definitions #define MOD_ALOADED 0x0001 #define MOD_BLACKLIST 0x0002 #define MOD_FNDDEPMOD 0x0004 @@ -404,7 +404,7 @@ static void add_mod(char *name) if (!strncmp(mod->name, "symbol:", 7)) TT.symreq = 1; } -// Parse cmdline options suplied for module. +// Parse cmdline options supplied for module. static char *add_cmdopt(char **argv) { char *opt = xzalloc(1); diff --git a/toys/pending/sh.c b/toys/pending/sh.c index 64538699d..e5880a57b 100644 --- a/toys/pending/sh.c +++ b/toys/pending/sh.c @@ -1823,7 +1823,7 @@ dprintf(2, "TODO: do math for %.*s\n", kk, s); oo = 0; } - // Skip trailing seperator (combining whitespace) + // Skip trailing separator (combining whitespace) kk = 0; while ((jj = utf8chr(ss, TT.ff->ifs, &ll))) { if (!iswspace(jj) && kk++) break; @@ -3325,7 +3325,7 @@ dprintf(2, "TODO skipped init for((;;)), need math parser\n"); if (*s == 's') for (i = 0; iblk->farg.c; i++) dprintf(2, "%ld) %s\n", i+1, TT.ff->blk->farg.v[i]); - // TODO: bash man page says it performs <(process substituion) here?!? + // TODO: bash man page says it performs <(process substitution) here?!? } else if (!strcmp(s, "case")) { TT.ff->blk->fvar = expand_one_arg(ss, NO_NULL, &TT.ff->blk->fdelete); if (!TT.ff->blk->fvar) break; diff --git a/toys/pending/syslogd.c b/toys/pending/syslogd.c index 8c60dcd89..bae783452 100644 --- a/toys/pending/syslogd.c +++ b/toys/pending/syslogd.c @@ -93,7 +93,7 @@ static char *dec(int val, CODE *clist, char *buf) /* * recurses the logfile list and resolves config - * for evry file and updates facilty and log level bits. + * for every file and updates facilty and log level bits. */ static int resolve_config(struct logfile *file, char *config) { diff --git a/toys/pending/telnet.c b/toys/pending/telnet.c index 6b2c27329..f3add71e5 100644 --- a/toys/pending/telnet.c +++ b/toys/pending/telnet.c @@ -161,7 +161,7 @@ static void handle_server_output(int n) // // The only subnegotiation we support is IAC SB TTYPE SEND IAC SE, so we just // hard-code that into our state machine rather than having a more general - // "collect the subnegotation into a buffer and handle it after we've seen + // "collect the subnegotiation into a buffer and handle it after we've seen // the IAC SE at the end". It's 2021, so we're unlikely to need more. while (p < end) { diff --git a/toys/pending/tftp.c b/toys/pending/tftp.c index 80f143923..1d1a353f4 100644 --- a/toys/pending/tftp.c +++ b/toys/pending/tftp.c @@ -129,7 +129,7 @@ static int mkpkt_err(uint8_t *buffer, uint16_t errorcode, char *errormsg) } /* - * Recieves data from server in BUFF with socket SD and updates FROM + * Receives data from server in BUFF with socket SD and updates FROM * and returns read length. */ static int read_server(int sd, void *buf, int len, @@ -401,7 +401,7 @@ int file_put(void) goto errout_with_sd; } } - for (;;) { // loop for data sending and receving ack from server. + for (;;) { // loop for data sending and receiving ack from server. packetlen = mkpkt_data(fd, offset, packet, blockno); if (packetlen < 0) goto errout_with_sd; diff --git a/toys/pending/useradd.c b/toys/pending/useradd.c index d0ad03ab9..dc772e0cb 100644 --- a/toys/pending/useradd.c +++ b/toys/pending/useradd.c @@ -57,7 +57,7 @@ void useradd_main(void) if (getpwnam(s)) error_exit("'%s' in use", s); // Add a new group to the system, if UID is given then that is validated - // to be free, else a free UID is choosen by self. + // to be free, else a free UID is chosen by self. // SYSTEM IDs are considered in the range 100 ... 999 // add_user(), add a new entry in /etc/passwd, /etc/shadow files diff --git a/toys/pending/vi.c b/toys/pending/vi.c index fc46f3551..e23e49111 100644 --- a/toys/pending/vi.c +++ b/toys/pending/vi.c @@ -1008,7 +1008,7 @@ static void ctrl_y() static int vi_push(char reg, int count0, int count1) { //if row changes during push original cursor position is kept - //vi inconsistancy + //vi inconsistency //if yank ends with \n push is linemode else push in place+1 size_t history = TT.cursor; char *start = TT.yank.data; @@ -1045,7 +1045,7 @@ static int vi_find_cb(int count0, int count1, char *symbol) return 1; } -//if count is not spesified should go to last line +//if count is not specified should go to last line static int vi_go(int count0, int count1, char *symbol) { size_t prev_cursor = TT.cursor; @@ -1125,7 +1125,7 @@ static int vi_find_next(char reg, int count0, int count1) //where: //------------------------------------------------------------- //"[REG] is optional buffer where deleted/yanked text goes REG can be -// atleast 0-9, a-z or default " +// at least 0-9, a-z or default " //[COUNT] is optional multiplier for cmd execution if there is 2 COUNT // operations they are multiplied together //CMD is operation to be executed diff --git a/toys/pending/xzcat.c b/toys/pending/xzcat.c index 6fdf34285..2d1825fd9 100644 --- a/toys/pending/xzcat.c +++ b/toys/pending/xzcat.c @@ -833,7 +833,7 @@ enum xz_ret xz_dec_bcj_run(struct xz_dec_bcj *s, /* * Flush pending already filtered data to the output buffer. Return - * immediatelly if we couldn't flush everything, or if the next + * immediately if we couldn't flush everything, or if the next * filter in the chain had already returned XZ_STREAM_END. */ if (s->temp.filtered > 0) { @@ -1303,8 +1303,8 @@ struct lzma_dec { /* * LZMA properties or related bit masks (number of literal - * context bits, a mask dervied from the number of literal - * position bits, and a mask dervied from the number + * context bits, a mask derived from the number of literal + * position bits, and a mask derived from the number * position bits) */ uint32_t lc; @@ -1626,7 +1626,7 @@ static inline void rc_normalize(struct rc_dec *rc) } /* - * Decode one bit. In some versions, this function has been splitted in three + * Decode one bit. In some versions, this function has been split in three * functions so that the compiler is supposed to be able to more easily avoid * an extra branch. In this particular version of the LZMA decoder, this * doesn't seem to be a good idea (tested with GCC 3.3.6, 3.4.6, and 4.3.3 @@ -1903,7 +1903,7 @@ static int lzma_main(struct xz_dec_lzma2 *s) } /* - * Reset the LZMA decoder and range decoder state. Dictionary is nore reset + * Reset the LZMA decoder and range decoder state. Dictionary is not reset * here, because LZMA state may be reset without resetting the dictionary. */ static void lzma_reset(struct xz_dec_lzma2 *s) diff --git a/toys/posix/cp.c b/toys/posix/cp.c index ed62f04d0..d416bbd83 100644 --- a/toys/posix/cp.c +++ b/toys/posix/cp.c @@ -379,7 +379,7 @@ void cp_main(void) if (FLAG(a)||FLAG(p)) TT.pflags = _CP_mode|_CP_ownership|_CP_timestamps; - // Not using comma_args() (yet?) because interpeting as letters. + // Not using comma_args() (yet?) because interpreting as letters. if (FLAG(preserve)) { char *pre = xstrdup(TT.c.preserve ? TT.c.preserve : "mot"), *s; diff --git a/toys/posix/du.c b/toys/posix/du.c index 861186763..7152cf7bc 100644 --- a/toys/posix/du.c +++ b/toys/posix/du.c @@ -115,7 +115,7 @@ static int do_du(struct dirtree *node) if (!node->parent) TT.st_dev = node->st.st_dev; else if (!dirtree_notdotdot(node)) return 0; - // detect swiching filesystems + // detect switching filesystems if (FLAG(x) && (TT.st_dev != node->st.st_dev)) return 0; diff --git a/toys/posix/find.c b/toys/posix/find.c index 5d3f8e3e3..1dbc3fbe0 100644 --- a/toys/posix/find.c +++ b/toys/posix/find.c @@ -614,7 +614,7 @@ static int do_find(struct dirtree *new) ff = 0; ch = *fmt; - // long long is its own stack size on LP64, so handle seperately + // long long is its own stack size on LP64, so handle separately if (ch == 'i' || ch == 's') { strcpy(next+len, "lld"); printf(next, (ch == 'i') ? (long long)new->st.st_ino diff --git a/toys/posix/od.c b/toys/posix/od.c index f0edcd766..c9246b593 100644 --- a/toys/posix/od.c +++ b/toys/posix/od.c @@ -133,7 +133,7 @@ static void od_outline(void) if (TT.leftoverstr) as scratch space, now read string data, - // saving consective null terminated strings. (Save starting offsets into + // saving consecutive null terminated strings. (Save starting offsets into // str->offset to avoid strlen() loop to find relevant string.) // Fetch string data while parentfd still available, appending to buf. @@ -1791,7 +1791,7 @@ void top_main(void) #define FOR_iotop #include "generated/flags.h" -// Compare old and new proces lists to measure changes +// Compare old and new process lists to measure changes static int iotop_filter(long long *oslot, long long *nslot, int milis) { // Current I/O, or accumulated since process start? diff --git a/toys/posix/tar.c b/toys/posix/tar.c index c4fb4fa27..312a26dc2 100644 --- a/toys/posix/tar.c +++ b/toys/posix/tar.c @@ -208,7 +208,7 @@ static int add_to_tar(struct dirtree *node) while (*lnk=='/') lnk++; } - // Consume the 1 extra byte alocated in dirtree_path() + // Consume the 1 extra byte allocated in dirtree_path() if (S_ISDIR(st->st_mode) && name[i-1] != '/') strcat(name, "/"); // remove leading / and any .. entries from saved name @@ -583,7 +583,7 @@ static void unpack_tar(char *first) TT.hdr.size = 0; continue; } - // ensure null temination even of pathological packets + // ensure null termination even of pathological packets tar.padd[0] = and = 0; // Is this a valid TAR header? diff --git a/toys/posix/xargs.c b/toys/posix/xargs.c index cc3ee3de8..ffb677650 100644 --- a/toys/posix/xargs.c +++ b/toys/posix/xargs.c @@ -205,7 +205,7 @@ void xargs_main(void) else if (xv) toys.exitval = 123; } - // Abritrary number of execs, can't just leak memory each time... + // Arbitrary number of execs, can't just leak memory each time... llist_traverse(dlist, llist_free_double); dlist = 0; free(out); diff --git a/www/about.html b/www/about.html index 0c8637e49..baf05fb81 100755 --- a/www/about.html +++ b/www/about.html @@ -27,7 +27,7 @@

What is toybox?

1) a set of posix-ish command line utilities, 2) a compiler[1], 3) a C library, and 4) a kernel. This provides a reproducible and auditable -base system, which with the addition of a few convienciences (vi, top, +base system, which with the addition of a few conveniences (vi, top, shell command line history...) can provide a usable interactive experience rather than just a headless build server.

@@ -103,7 +103,7 @@

What is toybox?

the roadmap, and doing so is one of the main goals for toybox's 1.0 release.

-

Building LFS requres fewer commands than building AOSP, which has a lot more +

Building LFS requires fewer commands than building AOSP, which has a lot more build prerequisites. In theory some of those can be built from source as external packages (we're clearly not including our own java implementation), @@ -120,7 +120,7 @@

What is toybox?

for the 1.0 release and the reasons for including them.

In general, configuring toybox with "make defconfig" enables all the commands -compete enough to be useful. Configuring "allyesconfig" enables partially +complete enough to be useful. Configuring "allyesconfig" enables partially implemented commands as well, along with debugging features.

Relevant Standards

@@ -134,7 +134,7 @@

What is toybox?

8-bit clean and handle UTF-8, but otherwise we leave this to X11 and higher layers. And some things (like $CDPATH support in "cd") await a good explanation of why to bother with them. (POSIX provides an important -frame of reference, but is not an infallable set of commandments to be blindly +frame of reference, but is not an infallible set of commandments to be blindly obeyed. We do try to document our deviations from it in the comment section at the start of each command under toys/posix.)

@@ -187,7 +187,7 @@

What is toybox?

strip, readelf, nm, objdump, and so on as necessary. It's just the existing packages that do this kinda suck don't. (In theory "make" belongs in qcc, in practice llvm hasn't got its own make so toybox probably -needs to add it after 1.0 to eliminate another gpl build prerequite from +needs to add it after 1.0 to eliminate another gpl build prerequisite from AOSP.)

[2] diff --git a/www/cleanup.html b/www/cleanup.html index a41a75b7f..a6505d1f2 100644 --- a/www/cleanup.html +++ b/www/cleanup.html @@ -210,7 +210,7 @@

ifconfig

  • commit: 905, description: remove unnecessary wrapper function, inlining more functions, relying on the values of constants that don't change across architectures -(binary backwards compatability), more ifconfig_main table work, +(binary backwards compatibility), more ifconfig_main table work, man ioctl_list.
  • commit: 906, description: More ifconfig_main() table work, remove vestigial arguments diff --git a/www/code.html b/www/code.html index 25a181936..5537e4186 100644 --- a/www/code.html +++ b/www/code.html @@ -125,7 +125,7 @@

    toybox_main

  • lib/args.c
  • lib/dirtree.c
  • -
  • The toys directory contains the C files implementating +
  • The toys directory contains the C files implementing each command. Currently it contains five subdirectories categorizing the commands: posix, lsb, other, example, and pending.
  • The scripts directory contains the build and @@ -255,7 +255,7 @@

    toybox_main

    Otherwise it'll just segfault without explanation when it falls off the end because it didn't find a matching -end parantheses for a longopt, or you put a nonexistent option in a square +end parentheses for a longopt, or you put a nonexistent option in a square bracket grouping... Since these kind of errors can only be caused by a developer, not by end users, we don't normally want runtime checks for them. Once you're happy with your option string, you can switch TOYBOX_DEBUG @@ -352,7 +352,7 @@

    main.c

  • void (*toy_main)(void) - function pointer to run this command.

  • char *options - command line option string (used by -get_optflags() in lib/args.c to intialize toys.optflags, toys.optargs, and +get_optflags() in lib/args.c to initialize toys.optflags, toys.optargs, and entries in the toy's GLOBALS struct). When this is NULL, no option parsing is done before calling toy_main().

  • int flags - Behavior flags for this command. The following flags are currently understood:

    @@ -451,7 +451,7 @@

    main.c

    allocate memory when running other commands that don't use those global variables.

    -

    The first few fields of this structure can be intialized by get_optargs(), +

    The first few fields of this structure can be initialized by get_optargs(), as specified by the options field off this command's toy_list entry. See the get_optargs() description in lib/args.c for details.

  • @@ -609,7 +609,7 @@

    Temporary files:

    inside an appropriate USE_ macro, so code that #includes this file only sees the currently enabled commands.

    -

    By #definining NEWTOY() to various things before #including this file, +

    By #defining NEWTOY() to various things before #including this file, it may be used to create function prototypes (in toys.h), initialize the help_data array (in lib/help.c), initialize the toy_list array (in main.c, the alphabetical order lets toy_find() do a binary search, the exception to @@ -621,7 +621,7 @@

    Temporary files:

    Each NEWTOY and OLDTOY macro contains the command name, command line option string (telling lib/args.c how to parse command line options for -this command), recommended install location, and miscelaneous data such +this command), recommended install location, and miscellaneous data such as whether this command should retain root permissions if installed suid.

    @@ -1163,7 +1163,7 @@

    Optflags format string

    whitespace

    Arguments may occur with or without a space (I.E. "-a 42" or "-a42"). -The command line argument "-abc" may be interepreted many different ways: +The command line argument "-abc" may be interpreted many different ways: the optflags string "cba" sets toys.optflags = 7, "c:ba" sets toys.optflags=4 and saves "ba" as the argument to -c, and "cb:a" sets optflags to 6 and saves "c" as the argument to -b.

    @@ -1247,7 +1247,7 @@

    Optflags format string

    During a callback function, the int dirfd field of directory nodes contains a directory file descriptor (for use with the openat() family of -functions). This isn't usually used directly, intstead call dirtree_parentfd() +functions). This isn't usually used directly, instead call dirtree_parentfd() on the callback's node argument. The char again field is 0 for the first callback on a node, and 1 on the second callback (triggered by returning DIRTREE_COMEAGAIN on a directory, made after all children have been processed). @@ -1322,7 +1322,7 @@

    Optflags format string

    DIRTREE_RECURSE from the callback, instead calling dirtree_recurse() manually from elsewhere in the program. This gives ls -lR manual control of traversal order, which is neither depth first nor breadth first but -instead a sort of FIFO order requried by the ls standard.

    +instead a sort of FIFO order required by the ls standard.

    Directory toys/

    diff --git a/www/design.html b/www/design.html index a2d7e5370..407cbf924 100644 --- a/www/design.html +++ b/www/design.html @@ -34,7 +34,7 @@ should be solved by toybox including the missing dependencies itself (see "Shared Libraries" below).

    -

    Finally, toybox may provide some "convenience" utilties +

    Finally, toybox may provide some "convenience" utilities like top and vi that aren't necessarily used in a build but which turn the minimal build environment into a minimal development environment (supporting edit/compile/test cycles in a text console), configure @@ -112,7 +112,7 @@ part three, plus this article on -cacheing, and this one on +caching, and this one on bandwidth and latency. And there's more where that came from.) @@ -125,7 +125,7 @@ embedded processor may have 8k of L1 cache and no L2.)

    Learn how virtual memory and -memory managment units work. Don't touch +memory management units work. Don't touch memory you don't have to. Even just reading memory evicts stuff from L1 and L2 cache, which may have to be read back in later. Writing memory can force the operating system to break copy-on-write, which allocates more memory. (The @@ -256,14 +256,14 @@

    Prioritizing simplicity tends to serve our other goals: simplifying code generally reduces its size (both in terms of binary size and runtime memory usage), and avoiding unnecessary work makes code run faster. Smaller code -also tends to run faster on modern hardware due to CPU cacheing: fitting your +also tends to run faster on modern hardware due to CPU caching: fitting your code into L1 cache is great, and staying in L2 cache is still pretty good.

    But a simple implementation is not always the smallest or fastest, and balancing simplicity vs the other goals can be difficult. For example, the atolx_range() function in lib/lib.c always uses the 64 bit "long long" type, which produces larger and slower code on 32 bit platforms and -often assigned into smaller interger types. Although libc has parallel +often assigned into smaller integer types. Although libc has parallel implementations for different data sizes (atoi, atol, atoll) we chose a common codepath which can cover all cases (every user goes through the same codepath, with the maximum amount of testing and minimum and avoids @@ -520,7 +520,7 @@

    Coding style

    on the same line as the test/loop statement. The exception to both cases is if the test part of an if statement is long enough to split into multiple lines, then we put the curly bracket on its own line afterwards (so it doesn't -get lost in the multple line variably indented mess), and we put it there +get lost in the multiple line variably indented mess), and we put it there even if it's only grouping one line (because the indentation level is not providing clear information in that case).

    diff --git a/www/doc/mount.txt b/www/doc/mount.txt index f538c4675..67c7b9366 100644 --- a/www/doc/mount.txt +++ b/www/doc/mount.txt @@ -1,6 +1,6 @@ Here's how mount actually works: -The mount comand calls the mount system call, which has five arguments you +The mount command calls the mount system call, which has five arguments you can see on the "man 2 mount" page: int mount(const char *source, const char *target, const char *filesystemtype, @@ -30,7 +30,7 @@ read only. The mount command assembles an option string to supply to the "data" argument of the option syscall, but first it parses it for VFS options (ro,noexec,nodev,nosuid,noatime...) each of which corresponds to a flag from #include . The mount command removes those options from the -sting and sets the corresponding bit in mountflags, then the remaining options +string and sets the corresponding bit in mountflags, then the remaining options (if any) form the data argument for the filesystem driver. A few quick implementation details: the mountflag MS_SILENCE gets set by @@ -60,7 +60,7 @@ Different drivers implement different filesystems, which have four categories: This kind of filesystem driver acts as a lens to look at a block device through. The source argument for block backed filesystems is a path to a block device, such as "/dev/hda1", which stores the contents of the -filesystem in a fixed block of sequential storage, and there's a seperate +filesystem in a fixed block of sequential storage, and there's a separate driver providing that block device. Block backed filesystems are the "conventional" filesystem type most people @@ -92,7 +92,7 @@ more often than not you don't. These are also known as "pipe backed" filesystems (or "network filesystems" because that's a common case, although a network doesn't need to be inolved). -Conceptually they're char device backed filesystems (analogus to the block +Conceptually they're char device backed filesystems (analogous to the block device backed ones), but you don't commonly specify a character device in /dev when mounting them because you're talking to a specific server process, not a whole machine. diff --git a/www/ext2.html b/www/ext2.html index 28bd6cd57..d3b47cf21 100644 --- a/www/ext2.html +++ b/www/ext2.html @@ -47,7 +47,7 @@

    Blocks and Block Groups

    The linux/ext2_fs.h #include file defines struct ext2_super_block, struct ext2_group_desc, struct ext2_inode, struct ext2_dir_entry_2, and a lot of constants. Toybox doesn't use this file directly, instead it has an e2fs.h -include of its own containting cleaned-up versions of the data it needs.

    +include of its own containing cleaned-up versions of the data it needs.

    Superblock

    diff --git a/www/faq.html b/www/faq.html index 803d7b56d..d3e4b72d2 100755 --- a/www/faq.html +++ b/www/faq.html @@ -147,7 +147,7 @@

    Using toybox

    The counter-argument is that "continuous integration" can be made robust with sufficient automated testing. But like the -waterfall method, this places insufficent +waterfall method, this places insufficient emphasis on end-user feedback and learning from real world experience. Developer testing is either testing that the code does what the developers expect given known inputs running in an established environment, or it's @@ -484,7 +484,7 @@

    Using toybox


    Q: What's this ./ on the front of commands in your examples?

    A: When you don't give a path to a command's executable file, -linux command shells search the directories listed in the $PATH envionment +linux command shells search the directories listed in the $PATH environment variable (in order), which usually doesn't include the current directory for security reasons. The magic name "." indicates the current directory (the same way ".." means @@ -756,7 +756,7 @@

    Using toybox

    tried to explain what some of these architectures were.)

    -

    You can build all the targets at once, and can add additonal packages +

    You can build all the targets at once, and can add additional packages to the build, by calling the script directly and listing packages on the command line:

    diff --git a/www/news.html b/www/news.html index f7399659d..1f6a46ba3 100644 --- a/www/news.html +++ b/www/news.html @@ -475,7 +475,7 @@

    News

    David Legault complained that dir/.* tells rm to delete dir/.. and we'd do it. JakeSFR pointed out a bug in file's identification of broken symlinks. William Haddon fixed cp to treat a directory with a trailing slash -teh same as one without. +the same as one without. Denys Nykula fixed rm -i not to prompt for an empty "" argument. SebiderSushi reported that chmod g+s wasn't working. The linux kernel doesn't let an O_PATH fd work with fgetxattr(), so @@ -719,7 +719,7 @@

    News

    not just posix ones. The functions sig_to_num() and num_to_sig() moved into lib/portability.h, because MacOS has different signals. TOYFLAG_MAYFORK allows commands to run in toysh's process without forking, -but also makes them accessable from the toybox multiplexer or standalone. +but also makes them accessible from the toybox multiplexer or standalone. A MAYFORK command has to clean up after itself (even in error paths) and can't discard anything we need to keep (such as closing stdout).

    @@ -898,7 +898,7 @@

    News

    Vidar Holen fixed inverted find -exec exit status. Rob made chgrp() stop relying on libc's printf("%s", NULL) printing "(null)" because a newly added gcc bug turns that into a build break, and -fixed an outright embarassing xstrndup() bug. +fixed an outright embarrassing xstrndup() bug. Liwugang fixed a segfault when stat's format string had a trailing %. A missing else in grep meant -x was sometimes ignored.

    @@ -1062,7 +1062,7 @@

    News

    has the full functionality now. The general future direction or toybox is to either have a command or not have it; multiple versions of the same command aren't worth the complexity in testing, documentation, -or system adminstration).

    +or system administration).

    Library code: The mkflags plumbing can now support arbitrary punctuation as option @@ -1218,7 +1218,7 @@

    News

    long milliseconds argument. Redid xparsetime() to not need floating point, added xparsemillitime() for milliseconds common case, and parsetime() now treats leading garbage as an error instead of returning zero. -The bufgetpwuid()/pufgetgrgid() functons can now handle more than 4k of group +The bufgetpwuid()/pufgetgrgid() functions can now handle more than 4k of group data. The set_terminal() function can now set serial speed, and microcom.c uses it. Added xsignal_flags(), and more consistently use xsignal() (which wraps sigaction()) instead of signal(). @@ -1276,13 +1276,13 @@

    News

    ("cat /bin/ls | file -" still won't work but "file - < /bin/ls" should). Rob fixed a bug in netstat on 64 bit big endian systems, and fixed cut -DF -(a posix compliance fix broke its ability to act as a decent awk replacment +(a posix compliance fix broke its ability to act as a decent awk replacement because outputting all delimiterless lines isn't what you want there, -D now disables that too).

    Documentation: Rob added a buildroot section to the roadmap with the -prequisites that needs to run, and reformatted more of the ps --help text +prerequisites that needs to run, and reformatted more of the ps --help text to two columns.

    Library: @@ -1535,7 +1535,7 @@

    News

    Library: New library functions: strend() complements strstart(), minof()/maxof() -are min/max macros that evalute arguments once and autodetect type (why +are min/max macros that evaluate arguments once and autodetect type (why isn't this in libc?), xmmap() checks MAP_FAILED (which is not NULL).


    February 21, 2017

    @@ -1679,7 +1679,7 @@

    News

    apparently other versions do. The ifconfig output now shows the interface's device driver. Added patch -d and --dry-run, wc can now do -cm together, find has a NOP -noleaf so scripts that use that don't break, add -c to md5sum -and sha1sum. Elliott taught ps to treat extra aguments as additional -p +and sha1sum. Elliott taught ps to treat extra arguments as additional -p pids, implemented xxd -s, did a number of upgrades to file (added -HL, support for ar files, improved ELF support to report android API level and stripped/not stripped and it no longer prints a guessed build ID type). @@ -1747,7 +1747,7 @@

    News

    New library functions readlink0() and readlinkat0() which properly null terminates the symlink value (which the stock libc function inexplicably doesn't). -The new do_lines() function interates reading lines from a filehandle +The new do_lines() function iterates reading lines from a filehandle and calling a function on each line. New function pollinate() factoring out netcat's poll() loop so things like telnet can use it. @@ -1898,7 +1898,7 @@

    Build

    consistently prints the name of the command being tested at the start of each test (and the common infrastructure does that, not each individual test), and "make tests" actually runs all the available tests now. -Seperated pgrep and pkill tests, split lsattr/chattr, added fstype and base64 +Separated pgrep and pkill tests, split lsattr/chattr, added fstype and base64 tests. The "tests/files" directory now collects files for tests to use, with blkid, bzcat, and utf8 subdirectories: the $FILES variable gives a path to it, so "$FILES/blkid/ext2.bz2" and so on. @@ -2464,7 +2464,7 @@

    New stuff this release

    security modules stuff, if (lsm_enabled()) should turn into a compile-time constant 0 and let code drop out when TOYBOX_LSM_NONE selected, but testing against CFG_TOYBOX_LSM_NONE or derived symbols is still useful -becuase when it _is_ enabled the probe turns into a system call you +because when it _is_ enabled the probe turns into a system call you don't want to repeat too much.

    Switched a bunch of commands from signal() to xsignal(). Factored out @@ -2499,7 +2499,7 @@

    New stuff this release

    written for DOS or in assembly over the years). But I do care what Linux From Scratch expects, and if it's calling mv -v -then I impelement mv -v +then I implement mv -v even if posix hasn't got it. And I don't know why "gnu counterparts" would describe this when util-linux isn't a gnu package, nor are info-zip, e2fsprogs, kmod, less, @@ -2529,7 +2529,7 @@

    New stuff this release

    mix (promoted with fixes from Isaac Dunham), nsenter (from Andy Lutomirski, merged into unshare).

    -

    Elliott Hughes submited a bunch of patches to support Android (to +

    Elliott Hughes submitted a bunch of patches to support Android (to both toybox and Bionic libc, which he maintains). On toybox's end this involved a lot of fixups to portability.[ch] and fixes to over a dozen commands, plus several new ones. Other portability fixes included working @@ -2760,7 +2760,7 @@

    New commands

    cp now implements -HL and -F to force delete of pending files, cpio now ignores -m and implements -p, ls -C now has utf8 support (using wcwidth instead of strlen), and umount got a number of upgrades involving -looking things up in /proc/mounts. Other minor cleanups happend to +looking things up in /proc/mounts. Other minor cleanups happened to cut, touch, free, and id.

    In pending: Bradley Controy submitted mix (adjusts OSS sound volume). Ashwini @@ -2813,7 +2813,7 @@

    Build infrastructure

    A new addition to the "generated" directory is generated/build.sh containing a single compiler command line to build toybox in its current configuration. Combined with the generated/*.{h,sh} files from an -exisiting build, this may let you build on a new system that hasn't quite +existing build, this may let you build on a new system that hasn't quite got enough OS bits working to run a full configureand make.

    Internals

    @@ -2829,7 +2829,7 @@

    Internals

    Split xpopen() into xpopen_both(), xopen(), and xrun() depending on whether we want to redirect both, one, or neither of stdin/stdout.

    -

    Bugfixes: Better error message when TOYBOX_SUID option can't drop priviliges +

    Bugfixes: Better error message when TOYBOX_SUID option can't drop privileges (which happens when you suid something _other_ than root). The old pending version of nbd_client.c wasn't deleted when the command was promoted (and the build would break if both were enabled), @@ -3302,7 +3302,7 @@

    Bugfixes

    of other projects, and the README and about pages got updated.

    Fixed _another_ "ls -C" segfault when terminal size can't be detected, -condensed the ls help text to fit on one page, implented --color, and taught +condensed the ls help text to fit on one page, implemented --color, and taught -l to print the major, minor numbers when showing block/char devices. Argument parsing now handles "--" properly (to end option checking), and the infrastructure can now handle bare --longopts that have no @@ -3554,7 +3554,7 @@

    Bugfixes

    successfully apply more patches. Support for older (pre 2.10) glibc versions was added to portability.h.

    -

    Miscelaneous cleanups all around (mknod, sha1sum, logname), including a +

    Miscellaneous cleanups all around (mknod, sha1sum, logname), including a rewrite of taskset to be less dependent on libc getting the headers right. All the command headers should now point to the current relevant standards document, where applicable.

    @@ -3599,7 +3599,7 @@

    Bugfixes

    mostly a bugfix release for ls -l (which was unhappy on targets other than x86-64), plus a new "date" from Andre Renaud and rewritten chgrp/chown which now support the full set of posix flags, plus a little work on the test -suite and some more header tweaks towards eventual compatability with the +suite and some more header tweaks towards eventual compatibility with the musl libc.

    The todo list runneth over, but "release early, release often", so here @@ -3644,7 +3644,7 @@

    Bugfixes

    The "tac" and "clear" commands are now normal commands instead of shell wrappers, and the header #includes have been cleaned up a bit to remove -deprecated functions and attempt to increase compatability with the bionic and +deprecated functions and attempt to increase compatibility with the bionic and musl C libraries, "tail" should now use lseek() for large files, and "id" got some cleanups and bugfixes.

    diff --git a/www/oldnews.html b/www/oldnews.html index 92a5a524c..ca52ed152 100755 --- a/www/oldnews.html +++ b/www/oldnews.html @@ -96,7 +96,7 @@

    Old News

    help, mkfifo, netcat, patch, sha1sum, touch, and tty.

    Note that this "touch" includes -l to set the length, which can truncate -a file or create a commpletely sparse file, good for filesystem images.

    +a file or create a completely sparse file, good for filesystem images.

    Expect the next release in about 6 months.

    diff --git a/www/roadmap.html b/www/roadmap.html index 41b3866ae..ddb0cef76 100644 --- a/www/roadmap.html +++ b/www/roadmap.html @@ -39,7 +39,7 @@

    Goals and use cases

  • Building AOSP
  • Tizen Core
  • buildroot
  • -
  • Miscelaneous: klibc, glibc, +
  • Miscellaneous: klibc, glibc, sash, sbase, uclinux...
  • Other Packages
  • @@ -147,7 +147,7 @@

    Linux Standard Base

    POSIX allowed its standards process to be compromised by leaving things out, thus allowing IBM mainframes and Windows NT to drive -a truck through the holes and declare themselves compilant. But it means what +a truck through the holes and declare themselves compliant. But it means what they DID standardize tends to be respected (if sometimes obsolete).

    The Linux Standard Base's failure mode is different, they respond to @@ -187,7 +187,7 @@

    Linux Standard Base

    Where posix specifies one of those commands, LSB's deltas tend to be -accomodations for broken tool versions which aren't up to date with the +accommodations for broken tool versions which aren't up to date with the standard yet. (See more and xargs for examples.)

    @@ -261,11 +261,11 @@

    Use case: provide a self-hosting development environment< configure, make, and install in each package, and providing basic command line facilities such as a text editor. (It does not include a compiler toolchain or C library, those are outside the scope of the toybox project, although mkroot -has a potentialy follow-up project. +has a potentially follow-up project. For now we use distro toolchains, musl-cross-make, and the Android NDK for build testing.) -That build system also instaled bash 2.05b as #!/bin/sh and its scripts +That build system also installed bash 2.05b as #!/bin/sh and its scripts required bash extensions not present in shells such as busybox ash. To replace that toysh needs to supply several bash extensions _and_ work when called under the name "bash".

    @@ -630,7 +630,7 @@

    glibc

    unistd.h; it probably belongs in the development toolchain.

    getent handles retrieving entries from passwd-style databases -(in a rather lame way) and is trivially replacable by grep.

    +(in a rather lame way) and is trivially replaceable by grep.

    locale was discussed under posix. localedef compiles locale definitions, which musl currently does not use.

    @@ -647,7 +647,7 @@

    glibc

    standards body's database like glibc does, these are of no interest, but for completeness:

    -

    tzselect outputs a TZ variable correponding to user input. +

    tzselect outputs a TZ variable corresponding to user input. The documentation does not indicate how to use it in a script, but it seems that Debian may have done so. zdump prints current time in each of several timezones, optionally @@ -775,7 +775,7 @@

    nash:

    This list is nuts: "plymouth" is an alias for "null" which is basically -"true" (which thie above list doesn't have). Things like buildEnv and +"true" (which the above list doesn't have). Things like buildEnv and loadDrivers are bespoke Red Hat behavior that might as well be hardwired in to nash's main() without being called.

    @@ -948,7 +948,7 @@

    Taking out the trash

    so on), this gettyd isn't a generic version but specifically a hardwired ppp dialin utility, mgetty isn't a generic version but is combined with "sendfax", hostap is an intersil prism driver, wlan-ng is also an -intersil prism dirver, null is a program to intentionally dereference a +intersil prism driver, null is a program to intentionally dereference a null pointer (in case you needed one), iso_client is a "Demo Application for the USB Device Driver", kendin-config is "for configuring the Micrel Kendin KS8995M over QSPI", speedtouch configures