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/
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)
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)