[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 13/16] bsd-user/bsd-file.h: Implementation details for the fil
From: |
Warner Losh |
Subject: |
[PATCH v2 13/16] bsd-user/bsd-file.h: Implementation details for the filesystem calls |
Date: |
Sat, 26 Feb 2022 10:07:41 -0700 |
An include file that pulls in all the definitions needed for the file
related system calls. This also includes the host definitions to
implement the system calls and some helper routines to lock/unlock
different aspects of the system call arguments.
Signed-off-by: Warner Losh <imp@bsdimp.com>
---
bsd-user/bsd-file.h | 30 ++++++++++++++++++++++++++++++
bsd-user/freebsd/os-syscall.c | 2 ++
2 files changed, 32 insertions(+)
create mode 100644 bsd-user/bsd-file.h
diff --git a/bsd-user/bsd-file.h b/bsd-user/bsd-file.h
new file mode 100644
index 00000000000..f0c3f347ec0
--- /dev/null
+++ b/bsd-user/bsd-file.h
@@ -0,0 +1,30 @@
+/*
+ * file related system call shims and definitions
+ *
+ * Copyright (c) 2013 Stacey D. Son
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef BSD_FILE_H_
+#define BSD_FILE_H_
+
+#include "qemu/path.h"
+
+extern struct iovec *lock_iovec(int type, abi_ulong target_addr, int count,
+ int copy);
+extern void unlock_iovec(struct iovec *vec, abi_ulong target_addr, int count,
+ int copy);
+
+#endif /* !BSD_FILE_H_ */
diff --git a/bsd-user/freebsd/os-syscall.c b/bsd-user/freebsd/os-syscall.c
index 597a41c2f50..a17ff9f6ecc 100644
--- a/bsd-user/freebsd/os-syscall.c
+++ b/bsd-user/freebsd/os-syscall.c
@@ -41,6 +41,8 @@
#include "signal-common.h"
#include "user/syscall-trace.h"
+#include "bsd-file.h"
+
void target_set_brk(abi_ulong new_brk)
{
}
--
2.33.1
- [PATCH v2 02/16] bsd-user/x86_64/target_arch_cpu.h: int $80 never was a BSD system call on amd64, (continued)
- [PATCH v2 02/16] bsd-user/x86_64/target_arch_cpu.h: int $80 never was a BSD system call on amd64, Warner Losh, 2022/02/26
- [PATCH v2 03/16] bsd-user/x86_64/target_arch_cpu.h: Remove openbsd syscall, Warner Losh, 2022/02/26
- [PATCH v2 04/16] bsd-user/i386/target_arch_cpu.h: Remove openbsd syscall, Warner Losh, 2022/02/26
- [PATCH v2 05/16] bsd-user/arm/target_arch_cpu.h: Only support FreeBSD sys calls, Warner Losh, 2022/02/26
- [PATCH v2 06/16] bsd-user/arm/target_arch_thread.h: Assume a FreeBSD target, Warner Losh, 2022/02/26
- [PATCH v2 07/16] bsd-user/x86_64/target_arch_thread.h: Assume a FreeBSD target, Warner Losh, 2022/02/26
- [PATCH v2 09/16] bsd-user/freebsd/os-syscall.c: Move syscall processing here, Warner Losh, 2022/02/26
- [PATCH v2 12/16] bsd-user/freebsd/os-syscall.c: Add get_errno and host_to_target_errno, Warner Losh, 2022/02/26
- [PATCH v2 08/16] bsd-user: Remove bsd_type, Warner Losh, 2022/02/26
- [PATCH v2 10/16] bsd-user: Move system call building to os-syscall.c, Warner Losh, 2022/02/26
- [PATCH v2 13/16] bsd-user/bsd-file.h: Implementation details for the filesystem calls,
Warner Losh <=
- [PATCH v2 14/16] bsd-user: introduce target.h, Warner Losh, 2022/02/26
- [PATCH v2 16/16] bsd-user: Add safe system call macros, Warner Losh, 2022/02/26
- [PATCH v2 11/16] bsd-user/sycall.c: Now obsolete, remove, Warner Losh, 2022/02/26
- [PATCH v2 15/16] bsd-user: Define target_arg64, Warner Losh, 2022/02/26