upgrade to fedora-2.6.12-1.1398.FC4 + vserver 2.0.rc7
[linux-2.6.git] / fs / nfs / nfsroot.c
index 7db9747..f316add 100644 (file)
@@ -356,7 +356,7 @@ static void __init root_nfs_print(void)
 #endif
 
 
-int __init root_nfs_init(void)
+static int __init root_nfs_init(void)
 {
 #ifdef NFSROOT_DEBUG
        nfs_debug |= NFSDBG_ROOT;
@@ -384,15 +384,15 @@ int __init root_nfs_init(void)
  *  Parse NFS server and directory information passed on the kernel
  *  command line.
  */
-int __init nfs_root_setup(char *line)
+static int __init nfs_root_setup(char *line)
 {
        ROOT_DEV = Root_NFS;
        if (line[0] == '/' || line[0] == ',' || (line[0] >= '0' && line[0] <= '9')) {
                strlcpy(nfs_root_name, line, sizeof(nfs_root_name));
        } else {
-               int n = strlen(line) + strlen(NFS_ROOT);
+               int n = strlen(line) + sizeof(NFS_ROOT) - 1;
                if (n >= sizeof(nfs_root_name))
-                       line[sizeof(nfs_root_name) - strlen(NFS_ROOT) - 1] = '\0';
+                       line[sizeof(nfs_root_name) - sizeof(NFS_ROOT) - 2] = '\0';
                sprintf(nfs_root_name, NFS_ROOT, line);
        }
        root_server_addr = root_nfs_parse_addr(nfs_root_name);