]> granicus.if.org Git - strace/commitdiff
loop: use XLAT_MACROS_ONLY instead of #stop
authorEugene Syromyatnikov <evgsyr@gmail.com>
Fri, 26 Oct 2018 00:03:40 +0000 (02:03 +0200)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 26 Dec 2018 01:59:38 +0000 (01:59 +0000)
As the former allows controlling presence of xlat definitions
during the inclusion and not header generation.

* xlat/loop_cmds.in: Remove #stop.
* loop.c: Wrap "xlat/loop_cmds.h" inclusion in XLAT_MACROS_ONLY.
* tests/ioctl_loop.c: Likewise.

loop.c
tests/ioctl_loop.c
xlat/loop_cmds.in

diff --git a/loop.c b/loop.c
index b29bf56ef5d4d6114ae7c98bfef1d3f2086a8940..466950e1cf7387e708d7863fa549b48be8f237d1 100644 (file)
--- a/loop.c
+++ b/loop.c
@@ -17,7 +17,11 @@ typedef struct loop_info struct_loop_info;
 #include MPERS_DEFS
 
 #include "print_fields.h"
-#include "xlat/loop_cmds.h"
+
+#define XLAT_MACROS_ONLY
+# include "xlat/loop_cmds.h"
+#undef XLAT_MACROS_ONLY
+
 #include "xlat/loop_flags_options.h"
 #include "xlat/loop_crypt_type_options.h"
 
index 3f4fb0d915359a7854ab15fab357a9ea535c8d47..59d983188fc2e40b2362d8aa4d2f0ea0f50647f7 100644 (file)
 #include <linux/ioctl.h>
 #include <linux/loop.h>
 #include "print_fields.h"
-#include "xlat/loop_cmds.h"
+
+#define XLAT_MACROS_ONLY
+# include "xlat/loop_cmds.h"
+#undef XLAT_MACROS_ONLY
 
 #ifndef ABBREV
 # define ABBREV 0
index c4728af354307259a16ebe42c3971e45832c8e68..939fb4802ac54af6b0074940a71ed64ff84bc2db 100644 (file)
@@ -11,4 +11,3 @@ LOOP_SET_BLOCK_SIZE   0x4C09
 LOOP_CTL_ADD           0x4C80
 LOOP_CTL_REMOVE                0x4C81
 LOOP_CTL_GET_FREE      0x4C82
-#stop