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/ --- nfs/rpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nfs') diff --git a/nfs/rpc.c b/nfs/rpc.c index f5e19066..0b0444d0 100644 --- a/nfs/rpc.c +++ b/nfs/rpc.c @@ -75,7 +75,7 @@ generate_xid () credential structure with UID, GID, and SECOND_GID; any of these may be -1 to indicate that it does not apply, however, exactly zero or two of UID and GID must be -1. The returned address is a pointer - to the start of the payload. If NULL is returned, an error occured + to the start of the payload. If NULL is returned, an error occurred and the code is set in errno. */ int * initialize_rpc (int program, int version, int rpc_proc, -- 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 'nfs') 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 From 04db20c2fb450fc27300991eb029888487b580a0 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Wed, 19 Oct 2011 23:34:40 +0200 Subject: Fix building of nfs.static. * nfs/Makefile (HURDLIBS): Add ihash (for ports). * nfs/ops.c (netfs_set_translator): Don't define. It is the EOPNOTSUPP stub that is already being defined in libnetfs/set-get-trans.c. --- nfs/Makefile | 6 +++--- nfs/ops.c | 13 +------------ 2 files changed, 4 insertions(+), 15 deletions(-) (limited to 'nfs') diff --git a/nfs/Makefile b/nfs/Makefile index d6b8c9c0..10ca2587 100644 --- a/nfs/Makefile +++ b/nfs/Makefile @@ -1,6 +1,6 @@ # -# Copyright (C) 1995, 1996, 1997, 2000, 2001, 2008 Free Software Foundation, -# Inc. +# Copyright (C) 1995, 1996, 1997, 2000, 2001, 2008, 2011 Free Software +# Foundation, Inc. # # Written by Michael I. Bushnell. # @@ -28,6 +28,6 @@ LCLHDRS = nfs.h mount.h nfs-spec.h SRCS = ops.c rpc.c mount.c nfs.c cache.c consts.c main.c name-cache.c \ storage-info.c OBJS = $(SRCS:.c=.o) -HURDLIBS = netfs fshelp iohelp threads ports shouldbeinlibc +HURDLIBS = netfs fshelp iohelp threads ports ihash shouldbeinlibc include ../Makeconf diff --git a/nfs/ops.c b/nfs/ops.c index 96190d2e..05cfbe9a 100644 --- a/nfs/ops.c +++ b/nfs/ops.c @@ -1,5 +1,5 @@ /* ops.c - Libnetfs callbacks for node operations in NFS client. - Copyright (C) 1994,95,96,97,99,2002 Free Software Foundation, Inc. + Copyright (C) 1994,95,96,97,99,2002,2011 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -1881,17 +1881,6 @@ netfs_get_dirents (struct iouser *cred, struct node *np, } -/* Implement the netfs_set_translator callback as described in - . */ -error_t -netfs_set_translator (struct iouser *cred, - struct node *np, - char *argz, - size_t argzlen) -{ - return EOPNOTSUPP; -} - /* Implement the netfs_attempt_mksymlink callback as described in . */ error_t -- cgit v1.2.3