diff options
author | Rob Landley <rob@landley.net> | 2018-07-19 23:27:14 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2018-07-19 23:27:14 -0500 |
commit | 0c5577513f215d1b81fe62f06afe4351e18f8ceb (patch) | |
tree | 05195d10c278082768f68d6ad99094a9879ced49 | |
parent | 701d0d9328f3f8efb94a90c90994d3ada2648e35 (diff) | |
download | toybox-0c5577513f215d1b81fe62f06afe4351e18f8ceb.tar.gz |
Tweak/add some comments.
-rw-r--r-- | lib/linestack.c | 2 | ||||
-rw-r--r-- | lib/net.c | 2 | ||||
-rw-r--r-- | lib/toyflags.h | 6 | ||||
-rw-r--r-- | toys/net/netcat.c | 2 |
4 files changed, 7 insertions, 5 deletions
diff --git a/lib/linestack.c b/lib/linestack.c index 91dec564..b533c1f8 100644 --- a/lib/linestack.c +++ b/lib/linestack.c @@ -117,7 +117,7 @@ int crunch_str(char **str, int width, FILE *out, char *escmore, } -// standard escapes: ^X if <32, <XX> if invliad UTF8, U+XXXX if UTF8 !iswprint() +// standard escapes: ^X if <32, <XX> if invalid UTF8, U+XXXX if UTF8 !iswprint() int crunch_escape(FILE *out, int cols, int wc) { char buf[8]; @@ -103,7 +103,7 @@ int pollinate(int in1, int in2, int out1, int out2, int timeout, int shutdown_ti } } -// Return converted numeric address in libbuf +// Return converted ipv4/ipv6 numeric address in libbuf char *ntop(struct sockaddr *sa) { void *addr; diff --git a/lib/toyflags.h b/lib/toyflags.h index 859cca2e..bec8078b 100644 --- a/lib/toyflags.h +++ b/lib/toyflags.h @@ -6,6 +6,8 @@ // Flags describing command behavior. +// Where to install (toybox --long outputs absolute paths to commands) +// If no location bits set, command not listed in "toybox" command's output. #define TOYFLAG_USR (1<<0) #define TOYFLAG_BIN (1<<1) #define TOYFLAG_SBIN (1<<2) @@ -18,8 +20,8 @@ #define TOYFLAG_UMASK (1<<5) // This command runs as root. -#define TOYFLAG_STAYROOT (1<<6) -#define TOYFLAG_NEEDROOT (1<<7) +#define TOYFLAG_STAYROOT (1<<6) // Don't drop suid root before running cmd_main +#define TOYFLAG_NEEDROOT (1<<7) // Refuse to run if real uid != 0 #define TOYFLAG_ROOTONLY (TOYFLAG_STAYROOT|TOYFLAG_NEEDROOT) // Call setlocale to listen to environment variables. diff --git a/toys/net/netcat.c b/toys/net/netcat.c index cabc7e80..039b1944 100644 --- a/toys/net/netcat.c +++ b/toys/net/netcat.c @@ -108,7 +108,7 @@ void netcat_main(void) set_alarm(TT.wait); // The argument parsing logic can't make "<2" conditional on other - // arguments like -f and -l, so we do it by hand here. + // arguments like -f and -l, so do it by hand here. if ((toys.optflags&FLAG_f) ? toys.optc : (!(toys.optflags&(FLAG_l|FLAG_L)) && toys.optc!=2)) help_exit("bad argument count"); |