Hi, Michael

> @@ -552,11 +563,18 @@ char *slurp_file(const char *filename, o
>               if (err < 0)
>                       die("Can not seek to the begin of file %s: %s\n",
>                                       filename, strerror(errno));
> +             buf = slurp_fd(fd, filename, size, &nread, use_mmap);
>       } else {
>               size = stats.st_size;
> +             if (use_mmap) {
> +                     buf = mmap(NULL, size, PROT_READ | PROT_WRITE,
> +                                MAP_PRIVATE, fd, 0);
> +                     nread = stats.st_size;
> +             } else {
> +                     buf = slurp_fd(fd, filename, size, &nread, 0);
> +             }
>       }

Drop above changes and replace below lines with an extra use_mmap argument
should be enough?

-       buf = slurp_fd(fd, filename, size, &nread);
[snip]

Otherwise I'm fine with the patch.

Thanks
Dave

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

Reply via email to