1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

cleanup: keep using enum typedef

Using enum instead of unsigned.
This commit is contained in:
Zdenek Kabelac 2015-11-07 17:17:37 +01:00
parent 9b9b5d0ea2
commit e262d5e596
3 changed files with 8 additions and 6 deletions

View File

@ -33,7 +33,7 @@
* Any new external device info source needs to be * Any new external device info source needs to be
* registered using EXT_REGISTER macro in dev-ext.c. * registered using EXT_REGISTER macro in dev-ext.c.
*/ */
typedef enum { typedef enum dev_ext_e {
DEV_EXT_NONE, DEV_EXT_NONE,
DEV_EXT_UDEV, DEV_EXT_UDEV,
DEV_EXT_NUM DEV_EXT_NUM

View File

@ -30,7 +30,7 @@ static int _fwraid_filtering = 0;
static int _pvmove = 0; static int _pvmove = 0;
static int _full_scan_done = 0; /* Restrict to one full scan during each cmd */ static int _full_scan_done = 0; /* Restrict to one full scan during each cmd */
static int _obtain_device_list_from_udev = DEFAULT_OBTAIN_DEVICE_LIST_FROM_UDEV; static int _obtain_device_list_from_udev = DEFAULT_OBTAIN_DEVICE_LIST_FROM_UDEV;
static unsigned _external_device_info_source = DEV_EXT_NONE; static enum dev_ext_e _external_device_info_source = DEV_EXT_NONE;
static int _trust_cache = 0; /* Don't scan when incomplete VGs encountered */ static int _trust_cache = 0; /* Don't scan when incomplete VGs encountered */
static int _debug_level = 0; static int _debug_level = 0;
static int _debug_classes_logged = 0; static int _debug_classes_logged = 0;
@ -98,7 +98,7 @@ void init_obtain_device_list_from_udev(int device_list_from_udev)
_obtain_device_list_from_udev = device_list_from_udev; _obtain_device_list_from_udev = device_list_from_udev;
} }
void init_external_device_info_source(unsigned src) void init_external_device_info_source(enum dev_ext_e src)
{ {
_external_device_info_source = src; _external_device_info_source = src;
} }
@ -261,7 +261,7 @@ int obtain_device_list_from_udev(void)
return _obtain_device_list_from_udev; return _obtain_device_list_from_udev;
} }
unsigned external_device_info_source(void) enum dev_ext_e external_device_info_source(void)
{ {
return _external_device_info_source; return _external_device_info_source;
} }

View File

@ -20,6 +20,8 @@
#define SECURITY_LEVEL 0 #define SECURITY_LEVEL 0
#define PV_MIN_SIZE_KB 512 #define PV_MIN_SIZE_KB 512
enum dev_ext_e;
void init_verbose(int level); void init_verbose(int level);
void init_silent(int silent); void init_silent(int silent);
void init_test(int level); void init_test(int level);
@ -27,7 +29,7 @@ void init_md_filtering(int level);
void init_fwraid_filtering(int level); void init_fwraid_filtering(int level);
void init_pvmove(int level); void init_pvmove(int level);
void init_full_scan_done(int level); void init_full_scan_done(int level);
void init_external_device_info_source(unsigned src); void init_external_device_info_source(enum dev_ext_e src);
void init_obtain_device_list_from_udev(int device_list_from_udev); void init_obtain_device_list_from_udev(int device_list_from_udev);
void init_trust_cache(int trustcache); void init_trust_cache(int trustcache);
void init_debug(int level); void init_debug(int level);
@ -61,7 +63,7 @@ int fwraid_filtering(void);
int pvmove_mode(void); int pvmove_mode(void);
int full_scan_done(void); int full_scan_done(void);
int obtain_device_list_from_udev(void); int obtain_device_list_from_udev(void);
unsigned external_device_info_source(void); enum dev_ext_e external_device_info_source(void);
int trust_cache(void); int trust_cache(void);
int verbose_level(void); int verbose_level(void);
int silent_mode(void); int silent_mode(void);