aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorƁukasz Stelmach <l.stelmach@samsung.com>2024-03-08 15:36:30 +0100
committerDenis Kenzior <denkenz@gmail.com>2024-04-17 11:59:31 -0500
commit45185bd4df1651ab4d5a3614d4d6165a444b1aee (patch)
tree31f5a76ea0966e23c891a9cea6c71a063562f293
parent30f1ac8707322ce649532bcc8738a3acbf915748 (diff)
downloadconnman-45185bd4df1651ab4d5a3614d4d6165a444b1aee.tar.gz
inet: Ignore network devices used by NBD
Add support for ignoring devices used by NBD to mount root the same way ConnMan ignores devices used for NFS roots. nbdroot= nbddev= parameters are used by Debian and Tizen initramfs scripts to configure NBD for mounting as root device.
-rw-r--r--src/inet.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/inet.c b/src/inet.c
index 8a1e34235..5032cf25d 100644
--- a/src/inet.c
+++ b/src/inet.c
@@ -5086,6 +5086,10 @@ static int get_nfs_server_ip(const char *cmdline_file, const char *pnp_file,
for (pp = args; *pp; pp++) {
if (!strcmp(*pp, "root=/dev/nfs"))
break;
+ if (!strncmp(*pp, "root=/dev/nbd", strlen("root=/dev/nbd")))
+ break;
+ if (!strncmp(*pp, "nbddev=", strlen("nbddev=")))
+ break;
}
/* no rootnfs found */
if (!*pp)
@@ -5095,6 +5099,8 @@ static int get_nfs_server_ip(const char *cmdline_file, const char *pnp_file,
for (pp = args; *pp; pp++) {
if (!strncmp(*pp, "nfsroot=", strlen("nfsroot=")))
break;
+ if (!strncmp(*pp, "nbdroot=", strlen("nbdroot=")))
+ break;
}
/* no nfsroot argument found */
if (!*pp)