Date: Fri, 5 Jan 2018 07:09:29 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327575 - head/lib/libefivar Message-ID: <201801050709.w0579TYD031266@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Fri Jan 5 07:09:29 2018 New Revision: 327575 URL: https://svnweb.freebsd.org/changeset/base/327575 Log: Need to convert '/' back to '\' when creating a path. Ideally, this would be filesystem type dependent, but that's difficult to accomplish and it's unclear how the UEFI firmware will cope. Be conservative and make boot loaders cope instead. Sponsored by: Netflix Modified: head/lib/libefivar/efivar-dp-xlate.c Modified: head/lib/libefivar/efivar-dp-xlate.c ============================================================================== --- head/lib/libefivar/efivar-dp-xlate.c Fri Jan 5 07:09:24 2018 (r327574) +++ head/lib/libefivar/efivar-dp-xlate.c Fri Jan 5 07:09:29 2018 (r327575) @@ -527,12 +527,17 @@ find_geom_efimedia(struct gmesh *mesh, const char *dev static int build_dp(const char *efimedia, const char *relpath, efidp *dp) { - char *fp, *dptxt = NULL; + char *fp, *dptxt = NULL, *cp, *rp; int rv = 0; efidp out = NULL; size_t len; - fp = path_to_file_dp(relpath); + rp = strdup(relpath); + for (cp = rp; *cp; cp++) + if (*cp == '/') + *cp = '\\'; + fp = path_to_file_dp(rp); + free(rp); if (fp == NULL) { rv = ENOMEM; goto errout;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801050709.w0579TYD031266>