diff mbox series

[01/22] Implement struct target_ipc_perm

Message ID 20230819094806.14965-2-kariem.taha2.7@gmail.com
State New
Headers show
Series Implement the mmap system call for FreeBSD. | expand

Commit Message

Karim Taha Aug. 19, 2023, 9:47 a.m. UTC
From: Stacey Son <sson@FreeBSD.org>

Signed-off-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Karim Taha <kariem.taha2.7@gmail.com>
---
 bsd-user/syscall_defs.h | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

Comments

Richard Henderson Aug. 19, 2023, 2:37 p.m. UTC | #1
On 8/19/23 02:47, Karim Taha wrote:
> From: Stacey Son<sson@FreeBSD.org>
> 
> Signed-off-by: Stacey Son<sson@FreeBSD.org>
> Signed-off-by: Karim Taha<kariem.taha2.7@gmail.com>
> ---
>   bsd-user/syscall_defs.h | 17 +++++++++++++++++
>   1 file changed, 17 insertions(+)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~
Warner Losh Aug. 20, 2023, 4:07 a.m. UTC | #2
One general thing about all the patches in this series. The first line in
the
commit message should start with 'bsd-user: ' which I'll only say once.
You can fix it in v2 easily enough.

On Sat, Aug 19, 2023 at 3:48 AM Karim Taha <kariem.taha2.7@gmail.com> wrote:

> From: Stacey Son <sson@FreeBSD.org>
>
> Signed-off-by: Stacey Son <sson@FreeBSD.org>
> Signed-off-by: Karim Taha <kariem.taha2.7@gmail.com>
> ---
>  bsd-user/syscall_defs.h | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
>

Reviewed-by: Warner Losh <imp@bsdimp.com>


> diff --git a/bsd-user/syscall_defs.h b/bsd-user/syscall_defs.h
> index e4825f2662..39a9bc8ed7 100644
> --- a/bsd-user/syscall_defs.h
> +++ b/bsd-user/syscall_defs.h
> @@ -55,6 +55,23 @@ struct target_iovec {
>      abi_long iov_len;   /* Number of bytes */
>  };
>
> +/*
> + * sys/ipc.h
> + */
> +struct target_ipc_perm {
> +    uint32_t    cuid;       /* creator user id */
> +    uint32_t    cgid;       /* creator group id */
> +    uint32_t    uid;        /* user id */
> +    uint32_t    gid;        /* group id */
> +    uint16_t    mode;       /* r/w permission */
> +    uint16_t    seq;        /* sequence # */
> +    abi_long    key;        /* user specified msg/sem/shm key */
> +};
> +
> +#define TARGET_IPC_RMID 0   /* remove identifier */
> +#define TARGET_IPC_SET  1   /* set options */
> +#define TARGET_IPC_STAT 2   /* get options */
> +
>  /*
>   *  sys/mman.h
>   */
> --
> 2.40.0
>
>
diff mbox series

Patch

diff --git a/bsd-user/syscall_defs.h b/bsd-user/syscall_defs.h
index e4825f2662..39a9bc8ed7 100644
--- a/bsd-user/syscall_defs.h
+++ b/bsd-user/syscall_defs.h
@@ -55,6 +55,23 @@  struct target_iovec {
     abi_long iov_len;   /* Number of bytes */
 };
 
+/*
+ * sys/ipc.h
+ */
+struct target_ipc_perm {
+    uint32_t    cuid;       /* creator user id */
+    uint32_t    cgid;       /* creator group id */
+    uint32_t    uid;        /* user id */
+    uint32_t    gid;        /* group id */
+    uint16_t    mode;       /* r/w permission */
+    uint16_t    seq;        /* sequence # */
+    abi_long    key;        /* user specified msg/sem/shm key */
+};
+
+#define TARGET_IPC_RMID 0   /* remove identifier */
+#define TARGET_IPC_SET  1   /* set options */
+#define TARGET_IPC_STAT 2   /* get options */
+
 /*
  *  sys/mman.h
  */