Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1581623 > unrolled thread

[PATCH] uapi: fix linux/target_core_user.h userspace compilation errors

Started by"Dmitry V. Levin" <ldv@altlinux.org>
First post2017-02-15 21:10 +0100
Last post2017-02-19 06:50 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] uapi: fix linux/target_core_user.h userspace compilation errors "Dmitry V. Levin" <ldv@altlinux.org> - 2017-02-15 21:10 +0100
    Re: [PATCH] uapi: fix linux/target_core_user.h userspace  compilation errors "Nicholas A. Bellinger" <nab@linux-iscsi.org> - 2017-02-19 06:50 +0100

#1581623 — [PATCH] uapi: fix linux/target_core_user.h userspace compilation errors

From"Dmitry V. Levin" <ldv@altlinux.org>
Date2017-02-15 21:10 +0100
Subject[PATCH] uapi: fix linux/target_core_user.h userspace compilation errors
Message-ID<tbe3M-4vL-23@gated-at.bofh.it>
Consistently use types from linux/types.h to fix the following
linux/target_core_user.h userspace compilation errors:

/usr/include/linux/target_core_user.h:108:4: error: unknown type name 'uint32_t'
    uint32_t iov_cnt;
/usr/include/linux/target_core_user.h:109:4: error: unknown type name 'uint32_t'
    uint32_t iov_bidi_cnt;
/usr/include/linux/target_core_user.h:110:4: error: unknown type name 'uint32_t'
    uint32_t iov_dif_cnt;
/usr/include/linux/target_core_user.h:111:4: error: unknown type name 'uint64_t'
    uint64_t cdb_off;
/usr/include/linux/target_core_user.h:112:4: error: unknown type name 'uint64_t'
    uint64_t __pad1;
/usr/include/linux/target_core_user.h:113:4: error: unknown type name 'uint64_t'
    uint64_t __pad2;
/usr/include/linux/target_core_user.h:117:4: error: unknown type name 'uint8_t'
    uint8_t scsi_status;
/usr/include/linux/target_core_user.h:118:4: error: unknown type name 'uint8_t'
    uint8_t __pad1;
/usr/include/linux/target_core_user.h:119:4: error: unknown type name 'uint16_t'
    uint16_t __pad2;
/usr/include/linux/target_core_user.h:120:4: error: unknown type name 'uint32_t'
    uint32_t __pad3;

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
---
 include/uapi/linux/target_core_user.h | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/include/uapi/linux/target_core_user.h b/include/uapi/linux/target_core_user.h
index c506cdd..af17b41 100644
--- a/include/uapi/linux/target_core_user.h
+++ b/include/uapi/linux/target_core_user.h
@@ -105,26 +105,26 @@ struct tcmu_cmd_entry {
 
 	union {
 		struct {
-			uint32_t iov_cnt;
-			uint32_t iov_bidi_cnt;
-			uint32_t iov_dif_cnt;
-			uint64_t cdb_off;
-			uint64_t __pad1;
-			uint64_t __pad2;
+			__u32 iov_cnt;
+			__u32 iov_bidi_cnt;
+			__u32 iov_dif_cnt;
+			__u64 cdb_off;
+			__u64 __pad1;
+			__u64 __pad2;
 			struct iovec iov[0];
 		} req;
 		struct {
-			uint8_t scsi_status;
-			uint8_t __pad1;
-			uint16_t __pad2;
-			uint32_t __pad3;
+			__u8 scsi_status;
+			__u8 __pad1;
+			__u16 __pad2;
+			__u32 __pad3;
 			char sense_buffer[TCMU_SENSE_BUFFERSIZE];
 		} rsp;
 	};
 
 } __packed;
 
-#define TCMU_OP_ALIGN_SIZE sizeof(uint64_t)
+#define TCMU_OP_ALIGN_SIZE sizeof(__u64)
 
 enum tcmu_genl_cmd {
 	TCMU_CMD_UNSPEC,
-- 
ldv

[toc] | [next] | [standalone]


#1584067 — Re: [PATCH] uapi: fix linux/target_core_user.h userspace compilation errors

From"Nicholas A. Bellinger" <nab@linux-iscsi.org>
Date2017-02-19 06:50 +0100
SubjectRe: [PATCH] uapi: fix linux/target_core_user.h userspace compilation errors
Message-ID<tcsxH-3qY-1@gated-at.bofh.it>
In reply to#1581623
Hi Dmitry,

On Wed, 2017-02-15 at 23:04 +0300, Dmitry V. Levin wrote:
> Consistently use types from linux/types.h to fix the following
> linux/target_core_user.h userspace compilation errors:
> 
> /usr/include/linux/target_core_user.h:108:4: error: unknown type name 'uint32_t'
>     uint32_t iov_cnt;
> /usr/include/linux/target_core_user.h:109:4: error: unknown type name 'uint32_t'
>     uint32_t iov_bidi_cnt;
> /usr/include/linux/target_core_user.h:110:4: error: unknown type name 'uint32_t'
>     uint32_t iov_dif_cnt;
> /usr/include/linux/target_core_user.h:111:4: error: unknown type name 'uint64_t'
>     uint64_t cdb_off;
> /usr/include/linux/target_core_user.h:112:4: error: unknown type name 'uint64_t'
>     uint64_t __pad1;
> /usr/include/linux/target_core_user.h:113:4: error: unknown type name 'uint64_t'
>     uint64_t __pad2;
> /usr/include/linux/target_core_user.h:117:4: error: unknown type name 'uint8_t'
>     uint8_t scsi_status;
> /usr/include/linux/target_core_user.h:118:4: error: unknown type name 'uint8_t'
>     uint8_t __pad1;
> /usr/include/linux/target_core_user.h:119:4: error: unknown type name 'uint16_t'
>     uint16_t __pad2;
> /usr/include/linux/target_core_user.h:120:4: error: unknown type name 'uint32_t'
>     uint32_t __pad3;
> 
> Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
> ---
>  include/uapi/linux/target_core_user.h | 22 +++++++++++-----------
>  1 file changed, 11 insertions(+), 11 deletions(-)

Applied to target-pending/for-next.

Thank you.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web