diff options
author | Jason M. Bills <jason.m.bills@linux.intel.com> | 2020-12-08 00:38:17 +0300 |
---|---|---|
committer | Jason M. Bills <jason.m.bills@linux.intel.com> | 2020-12-08 00:38:17 +0300 |
commit | 8d6ae7f2a817751fad151168fa10ce28ee0869d8 (patch) | |
tree | 281032f7ec07c41589aa094bd165cc2a98f2d3a7 /poky/meta/recipes-devtools/pseudo/files/0001-realpath.c-Remove-trailing-slashes.patch | |
parent | c16fb8893b19075db4bcf3b5bf33c1db8c3ca2bd (diff) | |
parent | 5da3c2284560a7e08ffafd03c5b5ba44a3242228 (diff) | |
download | openbmc-8d6ae7f2a817751fad151168fa10ce28ee0869d8.tar.xz |
Merge tag '0.26' of ssh://git-amr-1.devtools.intel.com:29418/openbmc-openbmc into update
Diffstat (limited to 'poky/meta/recipes-devtools/pseudo/files/0001-realpath.c-Remove-trailing-slashes.patch')
-rw-r--r-- | poky/meta/recipes-devtools/pseudo/files/0001-realpath.c-Remove-trailing-slashes.patch | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/poky/meta/recipes-devtools/pseudo/files/0001-realpath.c-Remove-trailing-slashes.patch b/poky/meta/recipes-devtools/pseudo/files/0001-realpath.c-Remove-trailing-slashes.patch deleted file mode 100644 index 17829ef3a..000000000 --- a/poky/meta/recipes-devtools/pseudo/files/0001-realpath.c-Remove-trailing-slashes.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 86c9a5610e3333ad6aaadb1ac1e8b5a2c948d119 Mon Sep 17 00:00:00 2001 -From: Robert Yang <liezhi.yang@windriver.com> -Date: Mon, 25 Nov 2019 18:46:45 +0800 -Subject: [PATCH] realpath.c: Remove trailing slashes - -Linux system's realpath() remove trailing slashes, but pseudo's doesn't, need -make them identical. - -E.g., the following code (rel.c) prints '/tmp' with system's realpath, but -pseudo's realpath prints '/tmp/': - - #include <stdio.h> - #include <limits.h> - #include <stdlib.h> - - int main() { - char out[PATH_MAX]; - printf("%s\n", realpath("/tmp/", out)); - return 0; - } - -$ bitbake base-passwd -cdevshell # For pseudo env -$ gcc rel.c -$ ./a.out -/tmp/ (but should be /tmp) - -This patch fixes the problem. - -Upstream-Status: Submitted [https://lists.yoctoproject.org/g/poky/message/11879] - -Signed-off-by: Robert Yang <liezhi.yang@windriver.com> ---- - ports/unix/guts/realpath.c | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -diff --git a/ports/unix/guts/realpath.c b/ports/unix/guts/realpath.c ---- a/ports/unix/guts/realpath.c -+++ b/ports/unix/guts/realpath.c -@@ -14,7 +14,14 @@ - errno = ENAMETOOLONG; - return NULL; - } -- if ((len = strlen(rname)) >= pseudo_sys_path_max()) { -+ len = strlen(rname); -+ char *ep = rname + len - 1; -+ while (ep > rname && *ep == '/') { -+ --len; -+ *(ep--) = '\0'; -+ } -+ -+ if (len >= pseudo_sys_path_max()) { - errno = ENAMETOOLONG; - return NULL; - } --- -2.7.4 - |