public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: sekharan@us.ibm.com
Cc: Eric Sandeen <sandeen@redhat.com>,
	"Michael L. Semon" <mlsemon35@gmail.com>,
	xfs-oss <xfs@oss.sgi.com>
Subject: Re: [PATCH] xfstests: fix internal _xfs_check to handle logdev etc
Date: Thu, 02 May 2013 11:08:36 -0500	[thread overview]
Message-ID: <51828F84.3040508@sandeen.net> (raw)
In-Reply-To: <1367509132.4098.86.camel@chandra-dt.ibm.com>

On 5/2/13 10:38 AM, Chandra Seetharaman wrote:
> On Thu, 2013-05-02 at 09:53 -0500, Eric Sandeen wrote:
>> Pull all of the old xfs_check script into common/rc:_xfs_check()
>> so that it properly handles all options, including external log
>> devices.
> 
> I see changes only related to USAGE. iiuc, log devices are handled
> properly by current code.

also:

>> +    set -- extra $@
>> +    shift $OPTIND

have you *tested* log devices w/ your original code?  It failed for
Michael and for myself, so...  ;)

-Eric

>>
>> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
>> ---
>>
>> diff --git a/common/rc b/common/rc
>> index 19a0e18..b47a53e 100644
>> --- a/common/rc
>> +++ b/common/rc
>> @@ -393,8 +393,8 @@ _xfs_check()
>>  {
>>      OPTS=" "
>>      DBOPTS=" "
>> +    USAGE="Usage: xfs_check [-fsvV] [-l logdev] [-i ino]... [-b bno]... special"
>>
>> -    OPTIND=1
>>      while getopts "b:fi:l:stvV" c
>>      do
>>          case $c in
>> @@ -410,8 +410,17 @@ _xfs_check()
>>                  ;;
>>          esac
>>      done
>> -    ${XFS_DB_PROG}${DBOPTS} -F -i -p xfs_check -c "check$OPTS" $1
>> -    return $?
>> +    set -- extra $@
>> +    shift $OPTIND
>> +    case $# in
>> +        1)    ${XFS_DB_PROG}${DBOPTS} -F -i -p xfs_check -c "check$OPTS" $1
>> +               status=$?
>> +               ;;
>> +        2)    echo $USAGE 1>&1
>> +              status=2
>> +              ;;
>> +    esac
>> +    return $status
>>  }
>>
>>  _setup_large_ext4_fs()
>>
>>
>>
> 
> 
> _______________________________________________
> 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

  reply	other threads:[~2013-05-02 16:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-02 14:53 [PATCH] xfstests: fix internal _xfs_check to handle logdev etc Eric Sandeen
2013-05-02 15:38 ` Chandra Seetharaman
2013-05-02 16:08   ` Eric Sandeen [this message]
2013-05-02 17:44     ` Chandra Seetharaman
2013-05-02 18:31       ` Eric Sandeen
2013-05-02 20:35         ` Michael L. Semon
2013-05-02 20:48           ` Eric Sandeen
2013-05-02 21:54             ` Michael L. Semon
2013-05-02 21:58               ` Eric Sandeen
2013-05-03 16:09 ` Rich Johnston

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=51828F84.3040508@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=mlsemon35@gmail.com \
    --cc=sandeen@redhat.com \
    --cc=sekharan@us.ibm.com \
    --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