[LinuxBIOS] [patch 3/5] Allow user to specify pathnames for create and add
Carl-Daniel Hailfinger
c-d.hailfinger.devel.2006 at gmx.net
Mon Jul 23 18:48:27 CEST 2007
On 23.07.2007 18:06, jordan.crouse at amd.com wrote:
> Add another field to the filename specified for create and add operations
> to specify the intended pathname for the blob.
>
> Signed-off-by: Jordan Crouse <jordan.crouse at amd.com>
> Index: LinuxBIOSv3/util/lar/stream.c
> ===================================================================
> --- LinuxBIOSv3.orig/util/lar/stream.c 2007-07-23 09:47:04.000000000 -0600
> +++ LinuxBIOSv3/util/lar/stream.c 2007-07-23 09:51:39.000000000 -0600
> @@ -567,6 +569,20 @@
> if (filename[0] == '.' && filename[1] == '/')
> filename += 2;
>
> + pathname = strchr(filename, ':');
> +
> + if (pathname != NULL) {
> + *pathname = '\0';
> + pathname++;
> +
> + if (!strlen(pathname)) {
> + err("Invalid pathname specified.\n");
> + return -1;
> + }
> + }
We might want to add a notice to the man page/usage info that filenames
with a colon are invalid.
Regards
Carl-Daniel
More information about the coreboot
mailing list