From c0eaf0fad88f15c843098a43ca2cadbf009ce094 Mon Sep 17 00:00:00 2001 From: Jonathan Neuschäfer Date: Mon, 15 Aug 2011 22:10:09 +0200 Subject: fix common misspellings * Fix spelling with codespell[1] and manually review it. [1] http://git.profusion.mobi/cgit.cgi/lucas/codespell/ --- utils/devprobe.c | 2 +- utils/ftpcp.c | 2 +- utils/ftpdir.c | 2 +- utils/login.c | 2 +- utils/mount.c | 2 +- utils/vmstat.c | 2 +- utils/w.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) (limited to 'utils') diff --git a/utils/devprobe.c b/utils/devprobe.c index b5ebafe4..d7020322 100644 --- a/utils/devprobe.c +++ b/utils/devprobe.c @@ -35,7 +35,7 @@ static const struct argp_option options[] = { {0} }; static const char *args_doc = "DEVNAME..."; -static const char *doc = "Test for the existance of mach device DEVNAME..." +static const char *doc = "Test for the existence of mach device DEVNAME..." "\vThe exit status is 0 if any devices were found."; int diff --git a/utils/ftpcp.c b/utils/ftpcp.c index 4c4c151a..67ccb1a0 100644 --- a/utils/ftpcp.c +++ b/utils/ftpcp.c @@ -240,7 +240,7 @@ efinish (struct epoint *e) } /* Give a name which refers to a directory file, and a name in that - directory, this should return in COMPOSITE the composite name refering to + directory, this should return in COMPOSITE the composite name referring to that name in that directory, in malloced storage. */ error_t eappend (struct epoint *e, diff --git a/utils/ftpdir.c b/utils/ftpdir.c index 9b496add..4ccb821d 100644 --- a/utils/ftpdir.c +++ b/utils/ftpdir.c @@ -39,7 +39,7 @@ static struct argp_option options[] = {"account", 'a', "ACCT",0, "Account to login as"}, {"separator",'S', "SEP", 0, "String to separate multiple listings"}, {"prefix", 'P', "PFX", 0, "String to proceed listings; the first and second" - " occurances of %s are replace by HOST and DIR"}, + " occurrences of %s are replace by HOST and DIR"}, {"host", 'h', "HOST",0, "Use HOST as a default host"}, {"debug", 'D', 0, 0, "Turn on debugging output for ftp connections"}, {"intepret", 'i', 0, 0, "Parse the directory output"}, diff --git a/utils/login.c b/utils/login.c index aefc2187..cad3b1ed 100644 --- a/utils/login.c +++ b/utils/login.c @@ -663,7 +663,7 @@ main(int argc, char *argv[]) if (ugids.eff_uids.num + ugids.avail_uids.num == 0) /* We're transiting from having some uids to having none, which means this is probably a new login session. Unless specified otherwise, - set a timer to kill this session if it hasn't aquired any ids by + set a timer to kill this session if it hasn't acquired any ids by then. Note that we fork off the timer process before clearing the process owner: because we're interested in killing unowned processes, proc's in-same-login-session rule should apply to us diff --git a/utils/mount.c b/utils/mount.c index e9f64d85..8b059c23 100644 --- a/utils/mount.c +++ b/utils/mount.c @@ -48,7 +48,7 @@ static const struct argp_option argp_opts[] = {"timeout", 'T', "MILLISECONDS", 0, "Timeout for translator startup"}, {"format", 'p', "mount|fstab|translator", OPTION_ARG_OPTIONAL, "Output format for query (no filesystem arguments)"}, - {"options", 'o', "OPTIONS", 0, "A `,' seperated list of options"}, + {"options", 'o', "OPTIONS", 0, "A `,' separated list of options"}, {"readonly", 'r', 0, 0, "Never write to disk or allow opens for writing"}, {"writable", 'w', 0, 0, "Use normal read/write behavior"}, {"update", 'u', 0, 0, "Flush any meta-data cached in core"}, diff --git a/utils/vmstat.c b/utils/vmstat.c index 86494dce..bc3f2d45 100644 --- a/utils/vmstat.c +++ b/utils/vmstat.c @@ -456,7 +456,7 @@ main (int argc, char **argv) if (field->standard) output_fields |= (1 << (field - fields)); - /* Returns an appropiate SIZE_UNITS for printing FIELD. */ + /* Returns an appropriate SIZE_UNITS for printing FIELD. */ #define SIZE_UNITS(field) \ (size_units >= 0 \ ? size_units \ diff --git a/utils/w.c b/utils/w.c index 43bce025..37555088 100644 --- a/utils/w.c +++ b/utils/w.c @@ -253,7 +253,7 @@ static void add_utmp_procs (struct proc_stat_list *procs, struct utmp *u) { /* The tty name, with space for '\0' termination and an - appropiate prefix. */ + appropriate prefix. */ char tty[sizeof _PATH_DEV + sizeof u->ut_line]; io_t tty_node; error_t err; -- cgit v1.2.3 From f42555fed3a4151cb319a3fb079ae87f6d9c9aa5 Mon Sep 17 00:00:00 2001 From: Olaf Buddenhagen Date: Mon, 22 Aug 2011 01:24:43 +0200 Subject: Be less aggressive about switching to bigger units * utils/vmstat.c (print_val): Switch size unit at 10000 instead of 1024. --- utils/vmstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'utils') diff --git a/utils/vmstat.c b/utils/vmstat.c index bc3f2d45..7d852992 100644 --- a/utils/vmstat.c +++ b/utils/vmstat.c @@ -111,7 +111,7 @@ print_val (val_t val, enum val_type type, float fval = val; char *units = " KMGT", *u = units; - while (fval > 1024) + while (fval >= 10000) { fval /= 1024; u++; -- cgit v1.2.3 From 98316b2065135f6f115d31ca5633eca0b9b78740 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Wed, 19 Oct 2011 00:09:18 +0200 Subject: Add missing format strings for error, printk, problem Some calls to `error', `printk', and `problem' lacked a format string, leading to build failure when compiling with stricter CFLAGS. * nfs/mount.c (mount_root): Add format string for `error' calls which lacked it. * pfinet/main.c (pfinet_bind): Likewise. * term/main.c (main): Likewise. * utils/shd.c (run): Likewise. * utils/storeinfo.c (main): Likewise. * pfinet/linux-src/include/net/tcp.h (tcp_clear_xmit_timer): Add format string for `printk' call which lacked it. (tcp_timer_is_set): Likewise. * ufs-fsck/utilities.c (punt): Add format string for `problem' call which lacked it. --- nfs/mount.c | 4 ++-- pfinet/linux-src/include/net/tcp.h | 4 ++-- pfinet/main.c | 2 +- term/main.c | 2 +- ufs-fsck/utilities.c | 2 +- utils/shd.c | 2 +- utils/storeinfo.c | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) (limited to 'utils') diff --git a/nfs/mount.c b/nfs/mount.c index 07dbb19b..6120f87a 100644 --- a/nfs/mount.c +++ b/nfs/mount.c @@ -199,7 +199,7 @@ mount_root (char *name, char *host) err = conduct_rpc (&rpcbuf, &p); if (err) { - error (0, err, name); + error (0, err, "%s", name); goto error_with_rpcbuf; } /* XXX Protocol spec says this should be a "unix error code"; we'll @@ -209,7 +209,7 @@ mount_root (char *name, char *host) p++; if (err) { - error (0, err, name); + error (0, err, "%s", name); goto error_with_rpcbuf; } diff --git a/pfinet/linux-src/include/net/tcp.h b/pfinet/linux-src/include/net/tcp.h index 8072324d..abb4b210 100644 --- a/pfinet/linux-src/include/net/tcp.h +++ b/pfinet/linux-src/include/net/tcp.h @@ -1066,7 +1066,7 @@ static inline void tcp_clear_xmit_timer(struct sock *sk, int what) timer = &tp->probe_timer; break; default: - printk(timer_bug_msg); + printk("%s", timer_bug_msg); return; }; if(timer->prev != NULL) @@ -1088,7 +1088,7 @@ static inline int tcp_timer_is_set(struct sock *sk, int what) return tp->probe_timer.prev != NULL; break; default: - printk(timer_bug_msg); + printk("%s", timer_bug_msg); }; return 0; } diff --git a/pfinet/main.c b/pfinet/main.c index b4af267a..1357b037 100644 --- a/pfinet/main.c +++ b/pfinet/main.c @@ -415,7 +415,7 @@ pfinet_bind (int portclass, const char *name) } if (err) - error (1, err, name); + error (1, err, "%s", name); ports_port_deref (cntl); diff --git a/term/main.c b/term/main.c index 516a2dcf..405e7cd8 100644 --- a/term/main.c +++ b/term/main.c @@ -405,7 +405,7 @@ main (int argc, char **argv) } if (err) - error (1, err, peer_name); + error (1, err, "%s", peer_name); (*peercntl)->hook = peer_name; ports_port_deref (*peercntl); diff --git a/ufs-fsck/utilities.c b/ufs-fsck/utilities.c index 5e081fe8..14705f84 100644 --- a/ufs-fsck/utilities.c +++ b/ufs-fsck/utilities.c @@ -270,7 +270,7 @@ retch (char *reason) static void punt (char *msg) { - problem (0, msg); + problem (0, "%s", msg); flush_problems (); exit (8); } diff --git a/utils/shd.c b/utils/shd.c index 0587fa42..a1a4b26b 100644 --- a/utils/shd.c +++ b/utils/shd.c @@ -86,7 +86,7 @@ run (char **argv, int fd0, int fd1) file = file_name_lookup (program, O_EXEC, 0); if (file == MACH_PORT_NULL) { - error (0, errno, program); + error (0, errno, "%s", program); return -1; } else diff --git a/utils/storeinfo.c b/utils/storeinfo.c index 411bf11a..a738d50d 100644 --- a/utils/storeinfo.c +++ b/utils/storeinfo.c @@ -204,7 +204,7 @@ main (int argc, char *argv[]) struct store *store; if (file == MACH_PORT_NULL) - error (3, err, source); + error (3, err, "%s", source); if (print_prefix < 0) /* By default, only print filename prefixes for multiple files. */ @@ -220,7 +220,7 @@ main (int argc, char *argv[]) of what the unknown data looked like. */ err = store_create (file, STORE_INACTIVE|STORE_NO_FILEIO, 0, &store); if (err) - error (4, err, source); + error (4, err, "%s", source); print_store (store, 0, what); store_free (store); -- cgit v1.2.3