aboutsummaryrefslogtreecommitdiff
path: root/bioniccompat/include/sys
diff options
context:
space:
mode:
Diffstat (limited to 'bioniccompat/include/sys')
-rw-r--r--bioniccompat/include/sys/capability.h48
-rw-r--r--bioniccompat/include/sys/cdefs.h27
-rw-r--r--bioniccompat/include/sys/compat/mman.h35
-rw-r--r--bioniccompat/include/sys/compat/types.h40
-rw-r--r--bioniccompat/include/sys/prctl.h36
-rw-r--r--bioniccompat/include/sys/resource.h50
-rw-r--r--bioniccompat/include/sys/sendfile.h35
-rw-r--r--bioniccompat/include/sys/xattr.h56
8 files changed, 0 insertions, 327 deletions
diff --git a/bioniccompat/include/sys/capability.h b/bioniccompat/include/sys/capability.h
deleted file mode 100644
index 8a7213d..0000000
--- a/bioniccompat/include/sys/capability.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef SYS_CAPABILITY_H
-#define SYS_CAPABILITY_H
-
-#include <errno.h>
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-
-typedef struct __user_cap_header_struct {
- uint32_t version;
- int pid;
-} *cap_user_header_t;
-
-typedef struct __user_cap_data_struct {
- uint32_t effective;
- uint32_t permitted;
- uint32_t inheritable;
-} *cap_user_data_t;
-
-inline int capget(cap_user_header_t hdrp, cap_user_data_t datap) {
- datap->effective = datap->permitted = datap->inheritable = 0;
- return 0;
-}
-
-inline int capset(cap_user_header_t hdrp, const cap_user_data_t datap) {
- errno = EPERM;
- return -1;
-}
-
-__END_DECLS
-
-#endif // SYS_CAPABILITY_H
diff --git a/bioniccompat/include/sys/cdefs.h b/bioniccompat/include/sys/cdefs.h
deleted file mode 100644
index e9c44b4..0000000
--- a/bioniccompat/include/sys/cdefs.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#if defined(__cplusplus)
-#define __BEGIN_DECLS extern "C" {
-#define __END_DECLS }
-#else
-#define __BEGIN_DECLS
-#define __END_DECLS
-#endif
-
-#ifndef __UNUSED
-#define __UNUSED __attribute__((__unused__))
-#endif // __UNUSED
diff --git a/bioniccompat/include/sys/compat/mman.h b/bioniccompat/include/sys/compat/mman.h
deleted file mode 100644
index f92b110..0000000
--- a/bioniccompat/include/sys/compat/mman.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef SYS_COMPAT_MMAN_H
-#define SYS_COMPAT_MMAN_H
-
-#include "mman.h"
-#include "sys/cdefs.h"
-
-__BEGIN_DECLS
-
-// Fuchsia holds all pages in memory, see http://b/119503290 for more.
-inline int mincore(void *addr __UNUSED, size_t length, unsigned char *vec) {
- for(size_t i = 0; i < length; i++) {
- vec[i] = 1;
- }
- return 0;
-}
-
-__END_DECLS
-
-#endif // SYS_COMPAT_MMAN_H
diff --git a/bioniccompat/include/sys/compat/types.h b/bioniccompat/include/sys/compat/types.h
deleted file mode 100644
index 7315be3..0000000
--- a/bioniccompat/include/sys/compat/types.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef SYS_COMPAT_TYPES_H
-#define SYS_COMPAT_TYPES_H
-
-#include <sys/cdefs.h>
-#include <threads.h>
-#include <zircon/process.h>
-
-__BEGIN_DECLS
-
-/*
- * Zircon does not define an identifier for thread id. Instead
- * we rely on the handle. This is slightly risky as there is a
- * chance that other code may replace this handle with a different
- * one, so we will need to come up with a better solution in the
- * future. In particular, we should revisit when the Zircon team
- * determines whether or not to implement actual thread IDs.
- */
-inline pid_t gettid() {
- return zx_thread_self();
-}
-
-__END_DECLS
-
-#endif // SYS_COMPAT_TYPES_H
diff --git a/bioniccompat/include/sys/prctl.h b/bioniccompat/include/sys/prctl.h
deleted file mode 100644
index 2d7d8a0..0000000
--- a/bioniccompat/include/sys/prctl.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef SYS_PRCTL_H
-#define SYS_PRCTL_H
-
-#include <errno.h>
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-
-inline int prctl(int option,
- unsigned long arg2,
- unsigned long arg3,
- unsigned long arg4,
- unsigned long arg5) {
- errno = EINVAL;
- return -1;
-}
-
-__END_DECLS
-
-#endif // SYS_PRCTL_H
diff --git a/bioniccompat/include/sys/resource.h b/bioniccompat/include/sys/resource.h
deleted file mode 100644
index fba944f..0000000
--- a/bioniccompat/include/sys/resource.h
+++ /dev/null
@@ -1,50 +0,0 @@
-
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef SYS_RESOURCE_H
-#define SYS_RESOURCE_H
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-
-typedef unsigned long rlim_t;
-
-#define RLIM_INFINITY ((rlim_t) -1)
-
-struct rlimit {
- rlim_t rlim_cur;
- rlim_t rlim_max;
-};
-
-/*
- * Fuchsia has no concept of resource limits yet. Tell the system that
- * usage is unlimited (no soft or hard cap).
- */
-inline int getrlimit(int resource, struct rlimit *rlim) {
- if (!rlim) {
- errno = EINVAL;
- return -1;
- }
- rlim->rlim_cur = RLIM_INFINITY;
- rlim->rlim_max = RLIM_INFINITY;
- return 0;
-}
-
-__END_DECLS
-
-#endif // SYS_RESOURCE_H
diff --git a/bioniccompat/include/sys/sendfile.h b/bioniccompat/include/sys/sendfile.h
deleted file mode 100644
index 6a4c6c0..0000000
--- a/bioniccompat/include/sys/sendfile.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef SYS_SENDFILE_H
-#define SYS_SENDFILE_H
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-__BEGIN_DECLS
-
-/*
- * sendfile() here is a relatively straightforward implementation, but
- * obviously not as efficient as the typical syscall implementation which
- * does not require buffers be transferred to userspace and can take
- * advantage of DMA vectored I/O.
- */
-ssize_t sendfile(int out_fd, int in_fd, off_t* offset, size_t count);
-
-__END_DECLS
-
-#endif // SYS_SENDFILE_H
diff --git a/bioniccompat/include/sys/xattr.h b/bioniccompat/include/sys/xattr.h
deleted file mode 100644
index fc31abb..0000000
--- a/bioniccompat/include/sys/xattr.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef SYS_XATTR_H
-#define SYS_XATTR_H
-
-#include <errno.h>
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-
-#ifndef ENOATTR
-#define ENOATTR ENODATA
-#endif
-
-/*
- * Fuchsia does not support extended attirbutes on inodes (yet?), so
- * any getxattr implementation will not make much sense. Simply report
- * that the requested attribute does not exist and return.
- */
-inline ssize_t getxattr(const char* path __UNUSED, const char* name __UNUSED, void* value __UNUSED, size_t size __UNUSED) {
- errno = ENOTSUP;
- return -1;
-}
-
-inline ssize_t listxattr(const char *path __UNUSED, char *list __UNUSED, size_t size __UNUSED) {
- errno = ENOTSUP;
- return -1;
-}
-
-inline int setxattr(const char *path __UNUSED, const char *name __UNUSED, const void *value __UNUSED, size_t size __UNUSED, int flags __UNUSED) {
- errno = ENOTSUP;
- return -1;
-}
-
-inline int removexattr(const char *path __UNUSED, const char *name __UNUSED) {
- errno = ENOTSUP;
- return -1;
-}
-
-__END_DECLS
-
-#endif // SYS_XATTR_H