loop: use XLAT_MACROS_ONLY instead of #stop

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.
This commit is contained in:
Eugene Syromyatnikov 2018-10-26 02:03:40 +02:00
parent 826306c987
commit ce366255c5
3 changed files with 9 additions and 3 deletions

6
loop.c
View File

@ -37,7 +37,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"

View File

@ -41,7 +41,10 @@
#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

View File

@ -11,4 +11,3 @@ LOOP_SET_BLOCK_SIZE 0x4C09
LOOP_CTL_ADD 0x4C80
LOOP_CTL_REMOVE 0x4C81
LOOP_CTL_GET_FREE 0x4C82
#stop