Lines Matching +full:line +full:- +full:based

1 // SPDX-License-Identifier: GPL-2.0
8 * option 17 and/or kernel command line options.
19 * Martin Mares : (2.0) Auto-configuration via BOOTP supported.
30 * Martin Mares : (2.2) "0.0.0.0" addresses from command line ignored.
35 * _afterwards_ - thanks)
40 * Gero Kuhlmann : "0.0.0.0" addresses from command line are
50 * Jacek Zapala : Fixed a bug which prevented server-ip address
70 * Chuck Lever : Use super.c's text-based mount option parsing
99 /* Parameters passed from the kernel command line */
102 /* Text-based mount options passed to super.c */
116 * When the "nfsrootdebug" kernel command line option is specified,
130 * command line.
132 * nfsroot=[<server-ip>:]<root-dir>[,<nfs-options>]
134 * If there is a "%s" token in the <root-dir> string, it is replaced
135 * by the ASCII-representation of the client's IP address.
137 static int __init nfs_root_setup(char *line) in nfs_root_setup() argument
141 if (line[0] == '/' || line[0] == ',' || (line[0] >= '0' && line[0] <= '9')) { in nfs_root_setup()
142 strscpy(nfs_root_parms, line, sizeof(nfs_root_parms)); in nfs_root_setup()
144 size_t n = strlen(line) + sizeof(NFS_ROOT) - 1; in nfs_root_setup()
146 line[sizeof(nfs_root_parms) - sizeof(NFS_ROOT) - 2] = '\0'; in nfs_root_setup()
147 sprintf(nfs_root_parms, NFS_ROOT, line); in nfs_root_setup()
154 * Note: root_nfs_parse_addr() removes the server-ip from in nfs_root_setup()
167 if (strscpy(dest, src, destlen) == -E2BIG) in root_nfs_copy()
168 return -1; in root_nfs_copy()
177 if (len && dest[len - 1] != ',') in root_nfs_cat()
179 return -1; in root_nfs_cat()
182 return -1; in root_nfs_cat()
188 * passed-in string @incoming.
203 return -1; in root_nfs_parse_options()
212 return -1; in root_nfs_parse_options()
218 * the kernel command line. This has to be done late in order to
222 * Returns zero if successful; otherwise -1 is returned.
227 int len, retval = -1; in root_nfs_data()
237 dprintk("Root-NFS: DHCPv4 option 17: %s\n", in root_nfs_data()
244 dprintk("Root-NFS: nfsroot=%s\n", cmdline); in root_nfs_data()
264 * At this point, utsname()->nodename contains our local in root_nfs_data()
270 tmp, utsname()->nodename); in root_nfs_data()
284 printk(KERN_ERR "Root-NFS: could not allocate memory\n"); in root_nfs_data()
287 printk(KERN_ERR "Root-NFS: mount options string too long\n"); in root_nfs_data()
290 printk(KERN_ERR "Root-NFS: root device name too long.\n"); in root_nfs_data()
295 * nfs_root_data - Return prepared 'data' for NFSROOT mount
300 * otherwise -1 is returned.
306 printk(KERN_ERR "Root-NFS: no NFS server address\n"); in nfs_root_data()
307 return -1; in nfs_root_data()
311 return -1; in nfs_root_data()