summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/musl
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-09-12 18:05:31 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-09-17 08:41:44 +0100
commitb759a65e3f6cf419db34e9bff1712c6cdcc32608 (patch)
tree1f260cdfcbf9db6a5b03b89f048275b92911bc67 /meta/recipes-core/musl
parent7bf0d815877c441a92730de8b86e3c4de1f7165b (diff)
downloadpoky-b759a65e3f6cf419db34e9bff1712c6cdcc32608.tar.gz
musl: Wire-up name_to_handle_at and name_to_handle_at syscalls
(From OE-Core rev: c70bb5a24e8923a34adb9c7b8298ae12702e3f27) (From OE-Core rev: a74faf487545df16c7395ee6f6a302f989c1341b) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/musl')
-rw-r--r--meta/recipes-core/musl/musl/0001-wireup-linux-name_to_handle_at-and-name_to_handle_at.patch76
-rw-r--r--meta/recipes-core/musl/musl_git.bb1
2 files changed, 77 insertions, 0 deletions
diff --git a/meta/recipes-core/musl/musl/0001-wireup-linux-name_to_handle_at-and-name_to_handle_at.patch b/meta/recipes-core/musl/musl/0001-wireup-linux-name_to_handle_at-and-name_to_handle_at.patch
new file mode 100644
index 0000000000..4738e1efd8
--- /dev/null
+++ b/meta/recipes-core/musl/musl/0001-wireup-linux-name_to_handle_at-and-name_to_handle_at.patch
@@ -0,0 +1,76 @@
1From ef3ef607693a9513d5ab94a1de67dd2f1f97d8ad Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 12 Sep 2018 16:08:40 -0700
4Subject: [PATCH] wireup linux/name_to_handle_at and name_to_handle_at syscalls
5
6Upstream-Status: Submitted [https://www.openwall.com/lists/musl/2018/09/13/4]
7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8---
9 include/fcntl.h | 7 +++++++
10 src/linux/name_to_handle_at.c | 11 +++++++++++
11 src/linux/open_by_handle_at.c | 10 ++++++++++
12 3 files changed, 28 insertions(+)
13 create mode 100644 src/linux/name_to_handle_at.c
14 create mode 100644 src/linux/open_by_handle_at.c
15
16diff --git a/include/fcntl.h b/include/fcntl.h
17index 6d8edcd1..5c3defcb 100644
18--- a/include/fcntl.h
19+++ b/include/fcntl.h
20@@ -155,6 +155,11 @@ int lockf(int, int, off_t);
21 #define F_OWNER_PID 1
22 #define F_OWNER_PGRP 2
23 #define F_OWNER_GID 2
24+struct file_handle {
25+ unsigned int handle_bytes;
26+ int handle_type;
27+ unsigned char f_handle[];
28+};
29 struct f_owner_ex {
30 int type;
31 pid_t pid;
32@@ -170,6 +175,8 @@ struct f_owner_ex {
33 #define SPLICE_F_GIFT 8
34 int fallocate(int, int, off_t, off_t);
35 #define fallocate64 fallocate
36+int name_to_handle_at(int, const char *, struct file_handle *, int *, int);
37+int open_by_handle_at(int, struct file_handle *, int);
38 ssize_t readahead(int, off_t, size_t);
39 int sync_file_range(int, off_t, off_t, unsigned);
40 ssize_t vmsplice(int, const struct iovec *, size_t, unsigned);
41diff --git a/src/linux/name_to_handle_at.c b/src/linux/name_to_handle_at.c
42new file mode 100644
43index 00000000..bb6f8007
44--- /dev/null
45+++ b/src/linux/name_to_handle_at.c
46@@ -0,0 +1,11 @@
47+#define _GNU_SOURCE
48+#include <fcntl.h>
49+#include "syscall.h"
50+
51+int name_to_handle_at(int dirfd, const char *pathname,
52+ struct file_handle *handle,
53+ int *mount_id, int flags)
54+{
55+ return syscall(SYS_name_to_handle_at, dirfd,
56+ pathname, handle, mount_id, flags);
57+}
58diff --git a/src/linux/open_by_handle_at.c b/src/linux/open_by_handle_at.c
59new file mode 100644
60index 00000000..9bc93f14
61--- /dev/null
62+++ b/src/linux/open_by_handle_at.c
63@@ -0,0 +1,10 @@
64+#define _GNU_SOURCE
65+#include <fcntl.h>
66+#include "syscall.h"
67+
68+int open_by_handle_at(int mount_fd, struct file_handle *handle,
69+ int flags)
70+{
71+ return syscall(SYS_open_by_handle_at, mount_fd,
72+ handle, flags);
73+}
74--
752.19.0
76
diff --git a/meta/recipes-core/musl/musl_git.bb b/meta/recipes-core/musl/musl_git.bb
index de1cfd0058..f6edf7de61 100644
--- a/meta/recipes-core/musl/musl_git.bb
+++ b/meta/recipes-core/musl/musl_git.bb
@@ -11,6 +11,7 @@ PV = "1.1.20+git${SRCPV}"
11 11
12SRC_URI = "git://git.musl-libc.org/musl \ 12SRC_URI = "git://git.musl-libc.org/musl \
13 file://0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch \ 13 file://0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch \
14 file://0001-wireup-linux-name_to_handle_at-and-name_to_handle_at.patch \
14 " 15 "
15 16
16S = "${WORKDIR}/git" 17S = "${WORKDIR}/git"