diff mbox

repquota: use the same whitespace for quotaio_meta as quotaio_v2

Message ID 1459744540-22863-1-git-send-email-tytso@mit.edu (mailing list archive)
State New, archived
Headers show

Commit Message

Theodore Ts'o April 4, 2016, 4:35 a.m. UTC
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.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 repquota.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Jan Kara April 4, 2016, 9:31 a.m. UTC | #1
On Mon 04-04-16 00:35:40, Ted Tso wrote:
> 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.
> 
> Signed-off-by: Theodore Ts'o <tytso@mit.edu>

Thanks. Makes sense. I have merged the patch.

								Honza

> ---
>  repquota.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/repquota.c b/repquota.c
> index 957dc8d..ea79fc8 100644
> --- a/repquota.c
> +++ b/repquota.c
> @@ -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)
> -- 
> 2.5.0
>
diff mbox

Patch

diff --git a/repquota.c b/repquota.c
index 957dc8d..ea79fc8 100644
--- a/repquota.c
+++ b/repquota.c
@@ -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)