Skip to contentSkip to conversation

repquota: use the same whitespace for quotaio_meta as quotaio_v2

PATCH In review Theodore Ts'o 2 participants 2 messages Apr 4, 2016 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 repquota: use the same whitespace for quotaio_meta as quotaio_v2

If a quota implementation does not have a report function, such as quotaio_meta, print the same white spaces so that xfstests generic/235 doesn't fail. The extra white sapce makes it easier to read the output, and consistency is a good thing in any case.

---
 repquota.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
repquota.c +3 -2
index 957dc8d..ea79fc8 100644
@@ -400,9 +400,10 @@ static void report_it(struct quota_handle *h, int type)
 	if (h->qh_ops->scan_dquots(h, output) < 0)
 		return;
 	dump_cached_dquots(type);
-	if (h->qh_ops->report && ofmt == QOF_DEFAULT) {
+	if (ofmt == QOF_DEFAULT) {
 		putchar('\n');
-		h->qh_ops->report(h, flags & FL_VERBOSE);
+		if (h->qh_ops->report)
+			h->qh_ops->report(h, flags & FL_VERBOSE);
 		putchar('\n');
 	}
 	if (ofmt == QOF_XML)
Signature · 1 line
2.5.0
reviewer
#1 lore raw
Quoted 6 lines · Ted Tso

If a quota implementation does not have a report function, such as quotaio_meta, print the same white spaces so that xfstests generic/235 doesn't fail. The extra white sapce makes it easier to read the output, and consistency is a good thing in any case.

Thanks. Makes sense. I have merged the patch.

Honza

Quoted 24 lines
---
 repquota.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
repquota.c +3 -2
index 957dc8d..ea79fc8 100644
@@ -400,9 +400,10 @@ static void report_it(struct quota_handle *h, int type)
 	if (h->qh_ops->scan_dquots(h, output) < 0)
 		return;
 	dump_cached_dquots(type);
-	if (h->qh_ops->report && ofmt == QOF_DEFAULT) {
+	if (ofmt == QOF_DEFAULT) {
 		putchar('\n');
-		h->qh_ops->report(h, flags & FL_VERBOSE);
+		if (h->qh_ops->report)
+			h->qh_ops->report(h, flags & FL_VERBOSE);
 		putchar('\n');
 	}
 	if (ofmt == QOF_XML)
Signature · 1 line
2.5.0
Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR