diff options
author | Chuck Lever | 2010-09-17 10:54:37 -0400 |
---|---|---|
committer | Trond Myklebust | 2010-09-17 10:54:37 -0400 |
commit | 306a075362a288683f6346185f97dd0e06df19da (patch) | |
tree | bcade14a2a0b634c5bf64eab87db8219d8d6981c /fs/nfs | |
parent | 8d2321037896aa4868a67f45b2d6ed52b579a48a (diff) |
NFS: Allow NFSROOT debugging messages to be enabled dynamically
As a convenience, introduce a kernel command line option to enable
NFSROOT debugging messages.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/nfsroot.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/fs/nfs/nfsroot.c b/fs/nfs/nfsroot.c index 8e7d623173a9..460df3652889 100644 --- a/fs/nfs/nfsroot.c +++ b/fs/nfs/nfsroot.c @@ -67,6 +67,7 @@ * NFS over TCP. * Fabian Frederick: Option parser rebuilt (using parser lib) * Chuck Lever : Use super.c's text-based mount option parsing + * Chuck Lever : Add "nfsrootdebug". */ #include <linux/types.h> @@ -80,8 +81,6 @@ #include "internal.h" -/* Define this to allow debugging output */ -#undef NFSROOT_DEBUG #define NFSDBG_FACILITY NFSDBG_ROOT /* Default path we try to mount. "%s" gets replaced by our IP address */ @@ -103,6 +102,18 @@ static char nfs_export_path[NFS_MAXPATHLEN + 1] __initdata = ""; static char nfs_root_device[NFS_MAXPATHLEN + 1] __initdata = ""; /* + * When the "nfsrootdebug" kernel command line option is specified, + * enable debugging messages for NFSROOT. + */ +static int __init nfs_root_debug(char *__unused) +{ + nfs_debug |= NFSDBG_ROOT | NFSDBG_MOUNT; + return 1; +} + +__setup("nfsrootdebug", nfs_root_debug); + +/* * Parse NFS server and directory information passed on the kernel * command line. * @@ -282,10 +293,6 @@ out_devnametoolong: */ int __init nfs_root_data(char **root_device, char **root_data) { -#ifdef NFSROOT_DEBUG - nfs_debug |= NFSDBG_ROOT | NFSDBG_MOUNT; -#endif /* NFSROOT_DEBUG */ - servaddr = root_server_addr; if (servaddr == htonl(INADDR_NONE)) { printk(KERN_ERR "Root-NFS: no NFS server address\n"); |