[OpenWrt-Devel] [PATCH v2 1/3] mount_root: implement overlay= boot option

Rafał Miłecki zajec5 at gmail.com
Fri Apr 29 01:47:19 EDT 2016


On 28 April 2016 at 20:20,  <josua.mayer97 at gmail.com> wrote:
> @@ -33,6 +33,35 @@ start(int argc, char *argv[1])
>         if (!getenv("PREINIT"))
>                 return -1;
>
> +       /*
> +        * Check cmdline for a hint about overlay device
> +        */
> +       if(!data) {
> +               FILE *fp;
> +               char buffer[100] = {0};
> +
> +               fp = fopen("/proc/cmdline", "r");
> +               while(!feof(fp)) {
> +                       if(fscanf(fp, "overlay=%s", buffer))
> +                               break;

Please keep coding style consistent across the project. You can see there is:
if (!getenv("PREINIT"))
with space after "if". Please update your code to use the same style, e.g.:
if (!data)
while (!feof(fp)) {
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list