diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2020-01-07 10:55:42 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2020-01-07 10:55:42 -0500 |
commit | 897dcb749cc02c45c14f90556b792115d8d1a05c (patch) | |
tree | 981dce9cb5816130d3bfa65a14e2a7a9444512cb | |
parent | 44d0d73b308eb19593f7c4e1232cbaa4c0078ae8 (diff) | |
download | bfs-897dcb749cc02c45c14f90556b792115d8d1a05c.tar.xz |
util: Support ports and whiteouts in format_mode()
-rw-r--r-- | util.c | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -178,6 +178,8 @@ void format_mode(mode_t mode, char str[11]) { strcpy(str, "----------"); switch (bftw_mode_typeflag(mode)) { + case BFTW_REG: + break; case BFTW_BLK: str[0] = 'b'; break; @@ -190,16 +192,24 @@ void format_mode(mode_t mode, char str[11]) { case BFTW_DOOR: str[0] = 'D'; break; + case BFTW_LNK: + str[0] = 'l'; + break; case BFTW_FIFO: str[0] = 'p'; break; - case BFTW_LNK: - str[0] = 'l'; + case BFTW_PORT: + str[0] = 'P'; break; case BFTW_SOCK: str[0] = 's'; break; - default: + case BFTW_WHT: + str[0] = 'w'; + break; + case BFTW_UNKNOWN: + case BFTW_ERROR: + str[0] = '?'; break; } |