diff options
author | Petr Písař <ppisar@redhat.com> | 2013-10-16 14:55:18 +0200 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2013-10-29 23:29:52 +0100 |
commit | 23801eb4fc88904256303728279cf4cc3c721f6d (patch) | |
tree | 76b0d25a71611fef197a165985190f8d81eb59a0 /repquota.c | |
parent | a58761459f7485f275ecca5fd26b9a63c33f1089 (diff) | |
download | linuxquota-23801eb4fc88904256303728279cf4cc3c721f6d.tar.gz |
Silent a set-but-not-used warning about sbflags
If XFS_ROOTHACK is not defined, sbflags gets set but never used. This
patch declares the variable only if needed.
Signed-off-by: Petr Písař <ppisar@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'repquota.c')
-rw-r--r-- | repquota.c | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -231,9 +231,9 @@ static void print(struct dquot *dquot, char *name) char *spacehdr; if (flags & FL_SHORTNUMS) - spacehdr = "Space"; + spacehdr = "space"; else - spacehdr = "Block"; + spacehdr = "block"; printf(" <Quota user='%s'>\n\ <QuotaStatus %s='%s' inode='%s' />\n\ @@ -352,7 +352,7 @@ static void report_it(struct quota_handle *h, int type) if (ofmt == QOF_DEFAULT ) printf(_("*** Report for %s quotas on device %s\n"), _(type2name(type)), h->qh_quotadev); else if (ofmt == QOF_XML) - printf("<RepQuota type='%s' dev='%s'>\n", type2name(type), h->qh_quotadev); + printf("<Report type='%s' dev='%s'>\n", type2name(type), h->qh_quotadev); time2str(h->qh_info.dqi_bgrace, bgbuf, TF_ROUND); time2str(h->qh_info.dqi_igrace, igbuf, TF_ROUND); @@ -386,7 +386,7 @@ static void report_it(struct quota_handle *h, int type) putchar('\n'); } if (ofmt == QOF_XML) - printf("</RepQuota>\n"); + printf("</Report>\n"); } static void report(int type) @@ -412,7 +412,7 @@ int main(int argc, char **argv) init_kernel_interface(); if (ofmt == QOF_XML) - printf("<?xml version=\"1.0\"?>\n"); + printf("<?xml version=\"1.0\"?>\n<repquota>\n"); if (flags & FL_USER) report(USRQUOTA); @@ -420,5 +420,8 @@ int main(int argc, char **argv) if (flags & FL_GROUP) report(GRPQUOTA); + if (ofmt == QOF_XML) + printf("</repquota>\n"); + return 0; } |