From: Eric Sandeen <sandeen@sandeen.net>
To: Christoph Hellwig <hch@infradead.org>
Cc: Michael Monnerie <michael.monnerie@is.it-management.at>, xfs@oss.sgi.com
Subject: Re: [PATCH] xfsprogs: fix the -V option for various shell scripts
Date: Wed, 09 Sep 2009 12:04:10 -0500 [thread overview]
Message-ID: <4AA7E00A.1060201@sandeen.net> (raw)
In-Reply-To: <20090902174451.GB9759@infradead.org>
Christoph Hellwig wrote:
> For most of the shellscripts wrapping xfs_db or xfs_growfs the -V option
> is not implemented correctly. If we just add -V to the options for the
> underlying binaries we will never actually call it because the mandatory
> device / mount point argument is missing. Instead just call the underlying
> command with -V directly and exit early. This is what xfs_bmap.sh,
> xfs_mkfile and xfs_metadump.sh are already doing.
>
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Reported-by: Michael Monnerie <michael.monnerie@is.it-management.at>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
> Index: xfsprogs-dev/db/xfs_admin.sh
> ===================================================================
> --- xfsprogs-dev.orig/db/xfs_admin.sh 2009-09-02 14:36:22.045272960 -0300
> +++ xfsprogs-dev/db/xfs_admin.sh 2009-09-02 14:38:28.497305969 -0300
> @@ -19,7 +19,10 @@ do
> L) DB_OPTS=$DB_OPTS" -c 'label "$OPTARG"'";;
> u) DB_OPTS=$DB_OPTS" -r -c uuid";;
> U) DB_OPTS=$DB_OPTS" -c 'uuid "$OPTARG"'";;
> - V) DB_OPTS=$DB_OPTS" -V";;
> + V) xfs_db -p xfs_admin -V
> + status=$?
> + exit $status
> + ;;
> \?) echo $USAGE 1>&2
> exit 2
> ;;
> Index: xfsprogs-dev/db/xfs_check.sh
> ===================================================================
> --- xfsprogs-dev.orig/db/xfs_check.sh 2009-09-02 14:36:22.069271261 -0300
> +++ xfsprogs-dev/db/xfs_check.sh 2009-09-02 14:38:28.501271696 -0300
> @@ -13,11 +13,14 @@ do
> s) OPTS=$OPTS"-s ";;
> t) OPTS=$OPTS"-t ";;
> v) OPTS=$OPTS"-v ";;
> - V) OPTS=$OPTS"-V ";;
> i) OPTS=$OPTS"-i "$OPTARG" ";;
> b) OPTS=$OPTS"-b "$OPTARG" ";;
> f) DBOPTS=$DBOPTS" -f";;
> l) DBOPTS=$DBOPTS" -l "$OPTARG" ";;
> + V) xfs_db -p xfs_check -V
> + status=$?
> + exit $status
> + ;;
> \?) echo $USAGE 1>&2
> exit 2
> ;;
> Index: xfsprogs-dev/db/xfs_ncheck.sh
> ===================================================================
> --- xfsprogs-dev.orig/db/xfs_ncheck.sh 2009-09-02 14:36:22.089271988 -0300
> +++ xfsprogs-dev/db/xfs_ncheck.sh 2009-09-02 14:38:28.501271696 -0300
> @@ -14,9 +14,12 @@ do
> s) OPTS=$OPTS"-s ";;
> i) OPTS=$OPTS"-i "$OPTARG" ";;
> v) OPTS=$OPTS"-v ";;
> - V) OPTS=$OPTS"-V ";;
> f) DBOPTS=$DBOPTS" -f";;
> l) DBOPTS=$DBOPTS" -l "$OPTARG" ";;
> + V) xfs_db -p xfs_ncheck -V
> + status=$?
> + exit $status
> + ;;
> \?) echo $USAGE 1>&2
> exit 2
> ;;
> Index: xfsprogs-dev/growfs/xfs_info.sh
> ===================================================================
> --- xfsprogs-dev.orig/growfs/xfs_info.sh 2009-09-02 14:36:22.101270370 -0300
> +++ xfsprogs-dev/growfs/xfs_info.sh 2009-09-02 14:38:28.505312364 -0300
> @@ -10,7 +10,10 @@ while getopts "t:V" c
> do
> case $c in
> t) OPTS="-t $OPTARG" ;;
> - V) OPTS="-V $OPTARG" ;;
> + V) xfs_growfs -p xfs_info -V
> + status=$?
> + exit $status
> + ;;
> *) echo $USAGE 1>&2
> exit 2
> ;;
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2009-09-09 17:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-02 17:44 [PATCH] xfsprogs: fix the -V option for various shell scripts Christoph Hellwig
2009-09-09 17:04 ` Eric Sandeen [this message]
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=4AA7E00A.1060201@sandeen.net \
--to=sandeen@sandeen.net \
--cc=hch@infradead.org \
--cc=michael.monnerie@is.it-management.at \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox