diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-07-05 22:18:07 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:08 -0400 |
commit | d5bee8ca5a118f352dc81f2452ac41dcaf5100c5 (patch) | |
tree | fad167582862d32ff51555c37b8ab167308b380a /fs/bcachefs/opts.c | |
parent | c21affdd06661c8eb73c71fc54cdb8ec921b968f (diff) |
bcachefs: bch2_d_types[]
Add readable names for d_type, and use it in dirent_to_text().
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/opts.c')
-rw-r--r-- | fs/bcachefs/opts.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/bcachefs/opts.c b/fs/bcachefs/opts.c index 64bf5a382d63..fd3f7cddb9ab 100644 --- a/fs/bcachefs/opts.c +++ b/fs/bcachefs/opts.c @@ -63,6 +63,18 @@ const char * const bch2_member_states[] = { #undef x +const char * const bch2_d_types[] = { + [DT_UNKNOWN] = "unknown", + [DT_FIFO] = "fifo", + [DT_CHR] = "chr", + [DT_DIR] = "dir", + [DT_BLK] = "blk", + [DT_REG] = "reg", + [DT_LNK] = "lnk", + [DT_SOCK] = "sock", + [DT_WHT] = "whiteout", +}; + void bch2_opts_apply(struct bch_opts *dst, struct bch_opts src) { #define x(_name, ...) \ |