Displaying 5 results from an estimated 5 matches for "__nr_stat".
Did you mean:
__nr_lstat
2013 Nov 08
1
[PATCH 2/3] syscalls: Add syscalls needed by arm64
...mode 100644
> index 0000000..92343f1
> --- /dev/null
> +++ b/usr/klibc/stat.c
> @@ -0,0 +1,17 @@
> +#include <fcntl.h>
> +#include <unistd.h>
> +#include <sys/types.h>
> +#include <sys/stat.h>
> +#include <sys/syscall.h>
> +
> +#ifndef __NR_stat
> +
> +int stat(const char *path, struct stat *buf)
> +{
> + int fd = open(path, O_RDONLY);
> + int ret = fstat(fd, buf);
> + close(fd);
> + return ret;
> +}
> +
> +#endif /* __NR_stat */
No. Just... no. Especially not O_RDONLY without O_PATH.
But do an implementat...
2013 Nov 08
0
[PATCH 2/3] syscalls: Add syscalls needed by arm64
...ff --git a/usr/klibc/stat.c b/usr/klibc/stat.c
new file mode 100644
index 0000000..92343f1
--- /dev/null
+++ b/usr/klibc/stat.c
@@ -0,0 +1,17 @@
+#include <fcntl.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/syscall.h>
+
+#ifndef __NR_stat
+
+int stat(const char *path, struct stat *buf)
+{
+ int fd = open(path, O_RDONLY);
+ int ret = fstat(fd, buf);
+ close(fd);
+ return ret;
+}
+
+#endif /* __NR_stat */
diff --git a/usr/klibc/symlink.c b/usr/klibc/symlink.c
new file mode 100644
index 0000000..080394f
--- /dev/null
+++ b/usr/klibc/sy...
2013 Nov 12
0
[klibc:master] syscalls: Add syscalls needed by arm64
...ff --git a/usr/klibc/stat.c b/usr/klibc/stat.c
new file mode 100644
index 0000000..65063b0
--- /dev/null
+++ b/usr/klibc/stat.c
@@ -0,0 +1,14 @@
+#include <fcntl.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/syscall.h>
+
+#ifndef __NR_stat
+
+int stat(const char *path, struct stat *buf)
+{
+ return fstatat(AT_FDCWD, path, buf, 0);
+}
+
+#endif /* __NR_stat */
diff --git a/usr/klibc/symlink.c b/usr/klibc/symlink.c
new file mode 100644
index 0000000..080394f
--- /dev/null
+++ b/usr/klibc/symlink.c
@@ -0,0 +1,12 @@
+#include <fcntl.h...
2013 Nov 08
9
[PATCH 0/3] Introduce arm64 support
Hello,
This series introduces arm64 support to klibc.
I've rebased the work from Neil Williams and Anil Singhar into the
following three patches. Most of the code changes are due to new
syscall implementations being needed for arm64 as a only a minimal set
of syscalls are defined in the arm64 kernel.
This series is to be applied against the latest klibc, just after
25a66fa README.klibc:
2013 Nov 11
5
[PATCH V2 0/3] Introduce arm64 support
Hello,
Here is V2 of the arm64 support for klibc patch set.
Notable changes since the original series:
* fp regs dropped from setjmp/longjmp
* chmod, lstat and stat re-implemented with *at functions.
* open64 merged into open.
As with the original, this series is to be applied against the latest
klibc, just after
25a66fa README.klibc: update build information
V2 has been tested on x86_64