summaryrefslogtreecommitdiffstats
path: root/patches/unfs3-0.9.22
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2012-09-12 09:34:27 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2012-09-12 09:34:40 +0200
commit014b551823d08b7a5a9be8c8bafd648bf48de79e (patch)
tree0d79a156ef21100447d152820eeaca0eaa2559e6 /patches/unfs3-0.9.22
parent80ada668f2fa2027a2908ec1932af0d9d87e5413 (diff)
downloadptxdist-014b551823d08b7a5a9be8c8bafd648bf48de79e.tar.gz
ptxdist-014b551823d08b7a5a9be8c8bafd648bf48de79e.tar.xz
host-unfs3: new package
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'patches/unfs3-0.9.22')
-rw-r--r--patches/unfs3-0.9.22/0001-HACK-use-the-environment-variable-UNFS_BASE-as-root-.patch52
-rw-r--r--patches/unfs3-0.9.22/series4
2 files changed, 56 insertions, 0 deletions
diff --git a/patches/unfs3-0.9.22/0001-HACK-use-the-environment-variable-UNFS_BASE-as-root-.patch b/patches/unfs3-0.9.22/0001-HACK-use-the-environment-variable-UNFS_BASE-as-root-.patch
new file mode 100644
index 000000000..58412b9b8
--- /dev/null
+++ b/patches/unfs3-0.9.22/0001-HACK-use-the-environment-variable-UNFS_BASE-as-root-.patch
@@ -0,0 +1,52 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Wed, 12 Sep 2012 09:24:54 +0200
+Subject: [PATCH] HACK: use the environment variable UNFS_BASE as root
+ directory
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ backend_unix.h | 3 ++-
+ readdir.c | 12 ++++++++++++
+ 2 files changed, 14 insertions(+), 1 deletion(-)
+
+diff --git a/backend_unix.h b/backend_unix.h
+index 713288d..62dad83 100644
+--- a/backend_unix.h
++++ b/backend_unix.h
+@@ -23,6 +23,7 @@
+ /*
+ * system calls
+ */
++char *realpath_unix(const char *path, char *resolved_path);
+ #define backend_chmod chmod
+ #define backend_chown chown
+ #define backend_close close
+@@ -49,7 +50,7 @@
+ #define backend_pwrite pwrite
+ #define backend_readdir readdir
+ #define backend_readlink readlink
+-#define backend_realpath realpath
++#define backend_realpath realpath_unix
+ #define backend_remove remove
+ #define backend_rename rename
+ #define backend_rmdir rmdir
+diff --git a/readdir.c b/readdir.c
+index 0e7290c..556ebf9 100644
+--- a/readdir.c
++++ b/readdir.c
+@@ -213,3 +213,15 @@ READDIR3res read_dir(const char *path, cookie3 cookie, cookieverf3 verf,
+
+ return result;
+ }
++
++char *realpath_unix(const char *path, char *resolved_path)
++{
++ int l = 0;
++ char *base = getenv("UNFS_BASE");
++ if (base) {
++ strcpy(resolved_path, base);
++ l = strlen(base);
++ }
++ return realpath(path, resolved_path + l) ? resolved_path : NULL;
++}
++
diff --git a/patches/unfs3-0.9.22/series b/patches/unfs3-0.9.22/series
new file mode 100644
index 000000000..242765cc8
--- /dev/null
+++ b/patches/unfs3-0.9.22/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-HACK-use-the-environment-variable-UNFS_BASE-as-root-.patch
+# 30c3c8b49f4355b5352cae8eda795b4d - git-ptx-patches magic