diff options
author | Łukasz Stelmach <l.stelmach@samsung.com> | 2024-01-23 15:03:21 +0100 |
---|---|---|
committer | Łukasz Stelmach <l.stelmach@samsung.com> | 2024-03-08 15:38:21 +0100 |
commit | a229082fa750b28e7fdabd662bf33fb609fbcfd4 (patch) | |
tree | 2a802e71203d95cd17e1090ade43234da31368f9 | |
parent | 68690d2c0d108720fcb886df1327004c9e776107 (diff) | |
download | connman-a229082fa750b28e7fdabd662bf33fb609fbcfd4.tar.gz connman-a229082fa750b28e7fdabd662bf33fb609fbcfd4.tar.bz2 connman-a229082fa750b28e7fdabd662bf33fb609fbcfd4.zip |
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.
Change-Id: Ic30ca3110553c0646c3edb2d87a1ea8e8917b370
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Forwarded: https://lore.kernel.org/connman/20240308143630.2195695-1-l.stelmach@samsung.com/
-rw-r--r-- | src/inet.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -3509,6 +3509,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) @@ -3518,6 +3522,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) |