summaryrefslogtreecommitdiff
path: root/common.h
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2018-01-10 09:54:34 +0100
committerJan Kara <jack@suse.cz>2018-01-10 09:54:34 +0100
commit810bf9488fe74c90258b542ba2cb0d130e3785dd (patch)
tree394d9c1f3f5a9d54af76845630690fb605c57edb /common.h
parent4d81e8b4af6fdecf20ed777d67fe4b25e9fb46f6 (diff)
downloadlinuxquota-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.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/common.h b/common.h
index 935d6f1..4bf3e15 100644
--- a/common.h
+++ b/common.h
@@ -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 */