linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xfs_admin: don't add '=1' when building repair command line for -O
@ 2021-03-02 17:27 Darrick J. Wong
  2021-03-02 18:13 ` Eric Sandeen
  0 siblings, 1 reply; 2+ messages in thread
From: Darrick J. Wong @ 2021-03-02 17:27 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: xfs, Geert Hendrickx

From: Darrick J. Wong <djwong@kernel.org>

Geert Hendrickx reported an inconsistency between the xfs_admin manpage
and its behavior -- the documentation says that users must provide the
status explicitly, but the script injects '=1' anyway.  While this seems
to work with the glibc getsubopt, it's a bit ugly and isn't consistent
with the docs.

So, get rid of that extra two bytes.

Reported-by: Geert Hendrickx <geert@hendrickx.be>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 db/xfs_admin.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/db/xfs_admin.sh b/db/xfs_admin.sh
index 7a467dbe..02f34b73 100755
--- a/db/xfs_admin.sh
+++ b/db/xfs_admin.sh
@@ -20,7 +20,7 @@ do
 	j)	DB_OPTS=$DB_OPTS" -c 'version log2'";;
 	l)	DB_OPTS=$DB_OPTS" -r -c label";;
 	L)	DB_OPTS=$DB_OPTS" -c 'label "$OPTARG"'";;
-	O)	REPAIR_OPTS=$REPAIR_OPTS" -c $OPTARG=1";;
+	O)	REPAIR_OPTS=$REPAIR_OPTS" -c $OPTARG";;
 	p)	DB_OPTS=$DB_OPTS" -c 'version projid32bit'";;
 	r)	REPAIR_DEV_OPTS=" -r '$OPTARG'";;
 	u)	DB_OPTS=$DB_OPTS" -r -c uuid";;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] xfs_admin: don't add '=1' when building repair command line for -O
  2021-03-02 17:27 [PATCH] xfs_admin: don't add '=1' when building repair command line for -O Darrick J. Wong
@ 2021-03-02 18:13 ` Eric Sandeen
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Sandeen @ 2021-03-02 18:13 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: xfs, Geert Hendrickx

On 3/2/21 11:27 AM, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> Geert Hendrickx reported an inconsistency between the xfs_admin manpage
> and its behavior -- the documentation says that users must provide the
> status explicitly, but the script injects '=1' anyway.  While this seems
> to work with the glibc getsubopt, it's a bit ugly and isn't consistent
> with the docs.
> 
> So, get rid of that extra two bytes.

Neato! Nice catch, Geert, thanks.

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

> Reported-by: Geert Hendrickx <geert@hendrickx.be>
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> ---
>  db/xfs_admin.sh |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/db/xfs_admin.sh b/db/xfs_admin.sh
> index 7a467dbe..02f34b73 100755
> --- a/db/xfs_admin.sh
> +++ b/db/xfs_admin.sh
> @@ -20,7 +20,7 @@ do
>  	j)	DB_OPTS=$DB_OPTS" -c 'version log2'";;
>  	l)	DB_OPTS=$DB_OPTS" -r -c label";;
>  	L)	DB_OPTS=$DB_OPTS" -c 'label "$OPTARG"'";;
> -	O)	REPAIR_OPTS=$REPAIR_OPTS" -c $OPTARG=1";;
> +	O)	REPAIR_OPTS=$REPAIR_OPTS" -c $OPTARG";;
>  	p)	DB_OPTS=$DB_OPTS" -c 'version projid32bit'";;
>  	r)	REPAIR_DEV_OPTS=" -r '$OPTARG'";;
>  	u)	DB_OPTS=$DB_OPTS" -r -c uuid";;
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-03  3:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-02 17:27 [PATCH] xfs_admin: don't add '=1' when building repair command line for -O Darrick J. Wong
2021-03-02 18:13 ` Eric Sandeen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).