diff mbox series

Ignore network devices used by NBD

Message ID 20240308143630.2195695-1-l.stelmach@samsung.com (mailing list archive)
State Accepted
Commit 45185bd4df1651ab4d5a3614d4d6165a444b1aee
Headers show
Series Ignore network devices used by NBD | expand

Commit Message

Lukasz Stelmach March 8, 2024, 2:36 p.m. UTC
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.

Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
---
 src/inet.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

patchwork-bot+connman@kernel.org April 17, 2024, 5:10 p.m. UTC | #1
Hello:

This patch was applied to connman.git (master)
by Denis Kenzior <denkenz@gmail.com>:

On Fri,  8 Mar 2024 15:36:30 +0100 you wrote:
> 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.
> 
> Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
> 
> [...]

Here is the summary with links:
  - Ignore network devices used by NBD
    https://git.kernel.org/pub/scm/network/connman/connman.git/?id=45185bd4df16

You are awesome, thank you!
diff mbox series

Patch

diff --git a/src/inet.c b/src/inet.c
index 8a1e3423..5032cf25 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)