All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: Bill O'Donnell <billodo@redhat.com>, linux-xfs@vger.kernel.org
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH v2 2/3] xfs_quota: print and path output formatting: maintain reverse compatibility
Date: Thu, 15 Sep 2016 14:27:24 -0500	[thread overview]
Message-ID: <11523705-7d22-d1dd-3360-5203ff9b4d14@sandeen.net> (raw)
In-Reply-To: <1473953386-10242-3-git-send-email-billodo@redhat.com>

On 9/15/16 10:29 AM, Bill O'Donnell wrote:
> This patch adjusts the formatting of the xfs_quota print and
> path outputs, in order to maintain reverse compatability:
> when -f flag isn't used, need to keep the output same as in
> previous version.
> 
> Signed-off-by: Bill O'Donnell <billodo@redhat.com>

Last hunk ended up being a bit extraneous (unrelated whitespace
changes) but *shrug* Dave could drop it on commit maybe, if not
no biggie.

Reviewed-by: Eric Sandeen <sandeen@redhat.com>

Thanks,
-Eric

> ---
>  quota/path.c | 13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/quota/path.c b/quota/path.c
> index 01ccab4..57d14f0 100644
> --- a/quota/path.c
> +++ b/quota/path.c
> @@ -36,13 +36,14 @@ printpath(
>  	int		c;
>  
>  	if (index == 0) {
> -		printf(_("%sFilesystem          Pathname\n"),
> -			number ? _("      ") : "");
> +		printf(_("%s%sFilesystem          Pathname\n"),
> +		       number ? _("      ") : "",
> +		       foreign_allowed ? _("    ") : "");
>  	}
> -	if (number) {
> +	if (number)
>  		printf(_("%c%03d%c "), braces? '[':' ', index, braces? ']':' ');
> -	}
> -	printf("%s ", (path->fs_flags & FS_FOREIGN) ? "(F)" : "   ");
> +	if (foreign_allowed)
> +		printf("%s", (path->fs_flags & FS_FOREIGN) ? "(F) " : "    ");
>  	printf(_("%-19s %s"), path->fs_dir, path->fs_name);
>  	if (path->fs_flags & FS_PROJECT_PATH) {
>  		prj = getprprid(path->fs_prid);
> @@ -51,7 +52,7 @@ printpath(
>  			printf(_(", %s"), prj->pr_name);
>  		printf(")");
>  	} else if (xfsquotactl(XFS_GETQSTAT, path->fs_name, 0, 0,
> -				(void *)&qstat) == 0 && qstat.qs_flags) {
> +			       (void *)&qstat) == 0 && qstat.qs_flags) {
>  		c = 0;
>  		printf(" (");
>  		if (qstat.qs_flags & XFS_QUOTA_UDQ_ENFD)
> 

  reply	other threads:[~2016-09-15 19:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-14 15:19 [PATCH 0/3] xfsprogs: xfs_quota foreign fs path handling modifications Bill O'Donnell
2016-09-14 15:19 ` [PATCH 1/3] xfsprogs: populate fs table with xfs entries first, foreign entries last Bill O'Donnell
2016-09-14 17:50   ` Eric Sandeen
2016-09-14 19:54     ` Eric Sandeen
2016-09-14 15:19 ` [PATCH 2/3] xfs_quota: print and path output formatting: maintain reverse compatibility Bill O'Donnell
2016-09-14 22:14   ` Eric Sandeen
2016-09-14 15:19 ` [PATCH 3/3] xfs_quota: add case for foreign fs, disabled regardless of foreign_allowed Bill O'Donnell
2016-09-15 15:29 ` [PATCH v2 0/3] xfsprogs: xfs_quota foreign fs path handling modifications Bill O'Donnell
2016-09-15 15:29   ` [PATCH v2 1/3] xfsprogs: populate fs table with xfs entries first, foreign entries last Bill O'Donnell
2016-09-15 19:26     ` Eric Sandeen
2016-09-15 15:29   ` [PATCH v2 2/3] xfs_quota: print and path output formatting: maintain reverse compatibility Bill O'Donnell
2016-09-15 19:27     ` Eric Sandeen [this message]
2016-09-15 15:29   ` [PATCH v2 3/3] xfs_quota: add case for foreign fs, disabled regardless of foreign_allowed Bill O'Donnell
2016-09-15 19:32     ` Eric Sandeen
2016-09-15 19:57     ` [PATCH v3 " Bill O'Donnell
2016-09-15 20:43       ` Eric Sandeen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11523705-7d22-d1dd-3360-5203ff9b4d14@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=billodo@redhat.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.