diff options
author | Jan Kara <jack@suse.cz> | 2018-01-10 09:54:34 +0100 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2018-01-10 09:54:34 +0100 |
commit | 810bf9488fe74c90258b542ba2cb0d130e3785dd (patch) | |
tree | 394d9c1f3f5a9d54af76845630690fb605c57edb /common.h | |
parent | 4d81e8b4af6fdecf20ed777d67fe4b25e9fb46f6 (diff) | |
download | linuxquota-810bf9488fe74c90258b542ba2cb0d130e3785dd.tar.gz |
Implement manual choice of output unit
Add an optional argument to option -s allowing user to manually specify
units used for outputting results.
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'common.h')
-rw-r--r-- | common.h | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -46,7 +46,21 @@ char *sstrdup(const char *s); /* Print version string */ void version(void); +/* Desired output unit */ +enum s2s_unit { + S2S_NONE = 0, + S2S_KB, + S2S_MB, + S2S_GB, + S2S_TB, + S2S_AUTO, + S2S_INVALID +}; + /* Compare two times */ int timespec_cmp(struct timespec *a, struct timespec *b); +/* Convert command line option to desired output unit */ +int unitopt2unit(char *opt, enum s2s_unit *space_unit, enum s2s_unit *inode_unit); + #endif /* GUARD_COMMON_H */ |