Apparently some devices with eMMC (e.g. ZyXEL NBG6817) got an exsiting
GPT partition called 'rootfs_data'. This partition is then selected
as rootfs_data eventhough it may not be suitable for that (too small)
or serve another purpose (ie. used by vendor firmware).
To avoid this, check if the kernel cmdline contains a variable
fstools_ignore_partname=1 and if so, skip partname detection of volumes
alltogether.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
continue;
strncpy(out, &sep[1], len);
- out[len-1] = 0;
+ out[len-1] = '\0';
return out;
}
bool found = false;
glob_t gl;
+ if (get_cmdline_val("fstools_ignore_partname", rootparam, sizeof(rootparam))) {
+ if (!strcmp("1", rootparam))
+ return NULL;
+ }
+
if (get_cmdline_val("root", rootparam, sizeof(rootparam))) {
rootdev = rootdevname(rootparam);
/* find partition on same device as rootfs */