From: Dmitry V. Levin Date: Wed, 14 Aug 2019 19:05:08 +0000 (+0000) Subject: xlat/scsi_sg_commands: use XLAT_MACROS_ONLY instead of #stop X-Git-Tag: v5.3~51 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d88e348d6ea3613bebfd0a5c9b67aff20761dc42;p=strace xlat/scsi_sg_commands: use XLAT_MACROS_ONLY instead of #stop * xlat/scsi_sg_commands.in: Remove #stop. * scsi.c: Wrap "xlat/scsi_sg_commands.h" inclusion in XLAT_MACROS_ONLY. * tests/ioctl_scsi.c: Likewise. * tests/ioctl_sg_io_v4.c: Likewise. --- diff --git a/scsi.c b/scsi.c index 02749a38..2103878e 100644 --- a/scsi.c +++ b/scsi.c @@ -12,7 +12,9 @@ # include #endif -#include "xlat/scsi_sg_commands.h" +#define XLAT_MACROS_ONLY +# include "xlat/scsi_sg_commands.h" +#undef XLAT_MACROS_ONLY #include "xlat/sg_scsi_reset.h" static int diff --git a/tests/ioctl_scsi.c b/tests/ioctl_scsi.c index b6347b62..408ac779 100644 --- a/tests/ioctl_scsi.c +++ b/tests/ioctl_scsi.c @@ -15,7 +15,9 @@ # include # include # include -# include "xlat/scsi_sg_commands.h" +# define XLAT_MACROS_ONLY +# include "xlat/scsi_sg_commands.h" +# undef XLAT_MACROS_ONLY # define TEST_NO_ARG(cmd) \ do { \ diff --git a/tests/ioctl_sg_io_v4.c b/tests/ioctl_sg_io_v4.c index 59438285..a20a8d76 100644 --- a/tests/ioctl_sg_io_v4.c +++ b/tests/ioctl_sg_io_v4.c @@ -16,8 +16,9 @@ # include # include # include - -# include "xlat/scsi_sg_commands.h" +# define XLAT_MACROS_ONLY +# include "xlat/scsi_sg_commands.h" +# undef XLAT_MACROS_ONLY int main(void) diff --git a/xlat/scsi_sg_commands.in b/xlat/scsi_sg_commands.in index e95e0d12..44631b53 100644 --- a/xlat/scsi_sg_commands.in +++ b/xlat/scsi_sg_commands.in @@ -23,4 +23,3 @@ SG_GET_REQUEST_TABLE 0x2286 SG_SET_KEEP_ORPHAN 0x2287 SG_GET_KEEP_ORPHAN 0x2288 SG_GET_ACCESS_COUNT 0x2289 -#stop