all: pack enums

This commit is contained in:
Thomas Schoebel-Theuer 2022-03-28 16:18:41 +02:00 committed by Thomas Schoebel-Theuer
parent 0615ab3a23
commit 213adc7632
6 changed files with 10 additions and 12 deletions

View File

@ -675,7 +675,7 @@ extern void set_button_wait(struct generic_brick *brick, bool val, bool force, i
* There is one exception: when @force is set, only the direction to
* "off" remains possible. This is useful for emergency shutdowns.
*/
typedef enum {
typedef enum brick_switch {
// only one brick instance
BR_ON_ONE, // switch on one brick instance
BR_OFF_ONE, // just switch off (may be switched on again)
@ -686,7 +686,7 @@ typedef enum {
BR_OFF_ALL,
BR_KILL_ALL,
BR_FREE_ALL,
} brick_switch_t;
} __packed brick_switch_t;
/////////////////////////////////////////////////////////////////////////

View File

@ -40,9 +40,7 @@ extern int brick_say_syslog_flood_limit;
extern int brick_say_syslog_flood_recovery;
extern int delay_say_on_overflow;
// printk() replacements
enum {
enum _say_mode {
SAY_DEBUG,
SAY_INFO,
SAY_WARN,
@ -50,7 +48,7 @@ enum {
SAY_FATAL,
SAY_TOTAL,
MAX_SAY_CLASS
};
} __packed;
extern const char *say_class[MAX_SAY_CLASS];

View File

@ -53,7 +53,7 @@ enum dirty_stage {
DIRTY_FINISHED,
/* Keep this the last element */
DIRTY_MAX
};
} __packed;
struct dirty_length {
rwlock_t dl_lock;

View File

@ -183,7 +183,7 @@ enum _MREF_FLAGS {
_MREF_COMPRESS_LZ4,
_MREF_COMPRESS_ZLIB,
_MREF_COMPRESS_LAST,
};
} __packed;
#define MREF_UPTODATE (1UL << _MREF_UPTODATE)
#define MREF_READING (1UL << _MREF_READING)
@ -414,7 +414,7 @@ enum mars_trigger_mode {
_MARS_TRIGGER_TO_REMOTE,
_MARS_TRIGGER_TO_REMOTE_ALL,
_MARS_TRIGGER_FULL,
};
} __packed;
#define MARS_TRIGGER_LOCAL (1 << _MARS_TRIGGER_LOCAL)
#define MARS_TRIGGER_FROM_REMOTE (1 << _MARS_TRIGGER_FROM_REMOTE)

View File

@ -105,7 +105,7 @@ enum mars_traffic_types {
MARS_TRAFFIC_REPLICATION,
MARS_TRAFFIC_SYNC,
MARS_TRAFFIC_MAX /* this must come last */
};
} __packed;
extern struct mars_tcp_params mars_tcp_params[MARS_TRAFFIC_MAX];
@ -122,7 +122,7 @@ enum {
CMD_PUSH_CHECK,
/* keep last element */
CMD_LAST
};
} __packed;
#define CMD_FLAG_MASK 255
#define CMD_FLAG_HAS_DATA 256

View File

@ -64,7 +64,7 @@ enum field_type {
FIELD_RAW,
FIELD_INT,
FIELD_UINT,
};
} __packed;
struct meta {
//char field_name[MAX_FIELD_LEN];