summaryrefslogtreecommitdiff
path: root/quotasys.h
diff options
context:
space:
mode:
authorPetr Písař <ppisar@redhat.com>2013-01-09 17:00:44 +0100
committerJan Kara <jack@suse.cz>2013-01-21 22:49:25 +0100
commit0ada9c13f9b8299ff607b66c37022ce2a3c4444b (patch)
tree9c52766219d2a636bb6d68a8ccca55f2ed36dbbf /quotasys.h
parent17e8b1a111d9d1c9a23ce91ab2e83df6c09b7e92 (diff)
Recognize units at block limits by setquota
This patch allows to specify suffixes at block limits on setquota command line. Binary units K, M, G, T are implemented. Numeric value without suffix is equivatent to kibibytes as before. This is complementary functionality to `quota -s'. Signed-off-by: Petr Písař <ppisar@redhat.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'quotasys.h')
-rw-r--r--quotasys.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/quotasys.h b/quotasys.h
index 1cebf7e..0cc2c4c 100644
--- a/quotasys.h
+++ b/quotasys.h
@@ -103,6 +103,9 @@ int str2timeunits(time_t, char *, time_t *);
/* Convert number in quota blocks to short printable form */
void space2str(qsize_t, char *, int);
+/* Convert block number with unit from string to quota blocks */
+const char *str2space(const char *string, qsize_t *space);
+
/* Convert number to short printable form */
void number2str(unsigned long long, char *, int);