~ubuntu-branches/ubuntu/utopic/xfsprogs/utopic-proposed

« back to all changes in this revision

Viewing changes to db/xfs_check64.sh

  • Committer: Bazaar Package Importer
  • Author(s): Nathan Scott
  • Date: 2002-04-13 09:45:06 UTC
  • Revision ID: james.westby@ubuntu.com-20020413094506-t8dhemv41gkeg4kx
Tags: 2.0.3-1
New upstream bugfix release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh -f
 
2
#
 
3
# Copyright (c) 2000 Silicon Graphics, Inc.  All Rights Reserved.
 
4
 
5
# This program is free software; you can redistribute it and/or modify it
 
6
# under the terms of version 2 of the GNU General Public License as
 
7
# published by the Free Software Foundation.
 
8
 
9
# This program is distributed in the hope that it would be useful, but
 
10
# WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
12
 
13
# Further, this software is distributed without any warranty that it is
 
14
# free of the rightful claim of any third person regarding infringement
 
15
# or the like.  Any license provided herein, whether implied or
 
16
# otherwise, applies only to this software file.  Patent licenses, if
 
17
# any, provided herein do not apply to combinations of this program with
 
18
# other software, or any other product whatsoever.
 
19
 
20
# You should have received a copy of the GNU General Public License along
 
21
# with this program; if not, write the Free Software Foundation, Inc., 59
 
22
# Temple Place - Suite 330, Boston MA 02111-1307, USA.
 
23
 
24
# Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
 
25
# Mountain View, CA  94043, or:
 
26
 
27
# http://www.sgi.com 
 
28
 
29
# For further information regarding this notice, see: 
 
30
 
31
# http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
 
32
#
 
33
#ident "$Revision: 1.1 $"
 
34
 
 
35
OPTS=" "
 
36
ISFILE=" "
 
37
USAGE="usage: xfs_check64 [-svf] [-i ino]... [-b bno]... special"
 
38
 
 
39
 
 
40
while getopts "b:fi:sv" c
 
41
do
 
42
        case $c in
 
43
        s)      OPTS=$OPTS"-s ";;
 
44
        v)      OPTS=$OPTS"-v ";;
 
45
        i)      OPTS=$OPTS"-i "$OPTARG" ";;
 
46
        b)      OPTS=$OPTS"-b "$OPTARG" ";;
 
47
        f)      ISFILE=" -f";;
 
48
        \?)     echo $USAGE 1>&2
 
49
                exit 2
 
50
                ;;
 
51
        esac
 
52
done
 
53
set -- extra $@
 
54
shift $OPTIND
 
55
case $# in
 
56
        1)      xfs_db64$ISFILE -i -p xfs_check64 -c "check$OPTS" $1
 
57
                status=$?
 
58
                ;;
 
59
        *)      echo $USAGE 1>&2
 
60
                exit 2
 
61
                ;;
 
62
esac
 
63
exit $status