1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

cov: convert some more enternal field masks

Some more 'internal' masks misusing enums for bitfields.
This commit is contained in:
Zdenek Kabelac 2024-05-27 13:53:55 +02:00
parent 3b649c3076
commit 90c6c421cd
3 changed files with 6 additions and 6 deletions

View File

@ -200,7 +200,7 @@ struct message_data {
char *dso_name; /* Name of DSO. */
char *device_uuid; /* Mapped device path. */
char *events_str; /* Events string as fetched from message. */
enum dm_event_mask events_field; /* Events bitfield. */
unsigned events_field; /* Events bitfield. */
uint32_t timeout_secs;
char *timeout_str;
struct dm_event_daemon_message *msg; /* Pointer to message buffer. */

View File

@ -753,7 +753,7 @@ static char *_fetch_string(char **src, const int delimiter)
/* Parse a device message from the daemon. */
static int _parse_message(struct dm_event_daemon_message *msg, char **dso_name,
char **uuid, enum dm_event_mask *evmask)
char **uuid, unsigned *evmask)
{
char *id;
char *p = msg->data;
@ -778,7 +778,7 @@ int dm_event_get_registered_device(struct dm_event_handler *dmevh, int next)
int ret = 0;
const char *uuid = NULL;
char *reply_dso = NULL, *reply_uuid = NULL;
enum dm_event_mask reply_mask = 0;
unsigned reply_mask = 0;
struct dm_task *dmt = NULL;
struct dm_event_daemon_message msg = { 0 };
struct dm_info info;

View File

@ -687,7 +687,7 @@ int config_def_get_path(char *buf, size_t buf_size, int id)
return _cfg_def_make_path(buf, buf_size, id, cfg_def_get_item_p(id), 0);
}
static void _get_type_name(char *buf, size_t buf_size, cfg_def_type_t type)
static void _get_type_name(char *buf, size_t buf_size, unsigned type)
{
(void) dm_snprintf(buf, buf_size, "%s%s%s%s%s%s",
(type & CFG_TYPE_ARRAY) ?
@ -700,8 +700,8 @@ static void _get_type_name(char *buf, size_t buf_size, cfg_def_type_t type)
(type & CFG_TYPE_STRING) ? " string" : "");
}
static void _log_type_error(const char *path, cfg_def_type_t actual,
cfg_def_type_t expected, int suppress_messages)
static void _log_type_error(const char *path, unsigned actual, unsigned expected,
int suppress_messages)
{
static char actual_type_name[128];
static char expected_type_name[128];