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:56:54 +0100
commitfdcf21db852bc8d6c1d0b41f2812ba614851e2b4 (patch)
tree76808220c658bb8b9a020e4be14af27fdad1dab4 /quotasys.h
parentf61d6442cc92a2b2935db6995b8d901235dbd076 (diff)
downloadlinuxquota-fdcf21db852bc8d6c1d0b41f2812ba614851e2b4.tar.gz
Recognize units at inode limits by setquota
This patch allows to specify suffixes at inode limits on setquota command line and standard input. Decimal Units k, m, g, t are implemented. Numeric value without suffix is equivatent to single inodes 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 0cc2c4c..505ea77 100644
--- a/quotasys.h
+++ b/quotasys.h
@@ -109,6 +109,9 @@ const char *str2space(const char *string, qsize_t *space);
/* Convert number to short printable form */
void number2str(unsigned long long, char *, int);
+/* Convert inode number with unit from string to quota inodes. */
+const char *str2number(const char *string, qsize_t *inodes);
+
/* Return pointer to given mount option in mount option string */
char *str_hasmntopt(const char *optstring, const char *opt);