mirror of
https://github.com/versity/scoutfs.git
synced 2026-08-20 14:16:49 +00:00
scoutfs: Tidy some enum usage
Prefer named to anonymous enums. This helps readability a little. Use enum as param type if possible (a couple spots). Remove unused enum in lock_server.c. Define enum spbm_flags using shift notation for consistency. Rename get_file_block()'s "gfb" parameter to "flags" for consistency. Signed-off-by: Andy Grover <agrover@versity.com>
This commit is contained in:
+5
-5
@@ -708,7 +708,7 @@ struct scoutfs_dirent {
|
||||
/* getdents returns next pos with an entry, no entry at (f_pos)~0 */
|
||||
#define SCOUTFS_DIRENT_LAST_POS (U64_MAX - 1)
|
||||
|
||||
enum {
|
||||
enum scoutfs_dentry_type {
|
||||
SCOUTFS_DT_FIFO = 0,
|
||||
SCOUTFS_DT_CHR,
|
||||
SCOUTFS_DT_DIR,
|
||||
@@ -806,7 +806,7 @@ struct scoutfs_net_header {
|
||||
#define SCOUTFS_NET_FLAG_RESPONSE (1 << 0)
|
||||
#define SCOUTFS_NET_FLAGS_UNKNOWN (U8_MAX << 1)
|
||||
|
||||
enum {
|
||||
enum scoutfs_net_cmd {
|
||||
SCOUTFS_NET_CMD_GREETING = 0,
|
||||
SCOUTFS_NET_CMD_ALLOC_INODES,
|
||||
SCOUTFS_NET_CMD_GET_LOG_TREES,
|
||||
@@ -836,7 +836,7 @@ enum {
|
||||
|
||||
#undef EXPAND_NET_ERRNO
|
||||
#define EXPAND_NET_ERRNO(which) SCOUTFS_NET_ERR_##which,
|
||||
enum {
|
||||
enum scoutfs_net_errors {
|
||||
SCOUTFS_NET_ERR_NONE = 0,
|
||||
EXPAND_EACH_NET_ERRNO
|
||||
SCOUTFS_NET_ERR_UNKNOWN,
|
||||
@@ -884,7 +884,7 @@ struct scoutfs_net_lock_recover {
|
||||
sizeof(struct scoutfs_net_lock))
|
||||
|
||||
/* some enums for tracing */
|
||||
enum {
|
||||
enum scoutfs_lock_trace {
|
||||
SLT_CLIENT,
|
||||
SLT_SERVER,
|
||||
SLT_GRANT,
|
||||
@@ -928,7 +928,7 @@ struct scoutfs_fid {
|
||||
/*
|
||||
* Identifiers for sources of corruption that can generate messages.
|
||||
*/
|
||||
enum {
|
||||
enum scoutfs_corruption_sources {
|
||||
SC_DIRENT_NAME_LEN = 0,
|
||||
SC_DIRENT_BACKREF_NAME_LEN,
|
||||
SC_DIRENT_READDIR_NAME_LEN,
|
||||
|
||||
Reference in New Issue
Block a user