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

« back to all changes in this revision

Viewing changes to db/xfs_ncheck64.sh

  • Committer: Bazaar Package Importer
  • Author(s): Nathan Scott
  • Date: 2009-09-17 14:32:48 UTC
  • Revision ID: james.westby@ubuntu.com-20090917143248-jrclwl1byyautnnk
Tags: 3.0.4
* New bugfix release
* Resolve a libxfs unaligned access (closes: #517553)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh -f
2
 
#
3
 
# Copyright (c) 2000-2001 Silicon Graphics, Inc.  All Rights Reserved.
4
 
#
5
 
 
6
 
OPTS=" "
7
 
DBOPTS=" "
8
 
USAGE="usage: xfs_ncheck64 [-sfvV] [-l logdev] [-i ino]... special"
9
 
 
10
 
while getopts "b:fi:l:svV" c
11
 
do
12
 
        case $c in
13
 
        s)      OPTS=$OPTS"-s ";;
14
 
        i)      OPTS=$OPTS"-i "$OPTARG" ";;
15
 
        v)      OPTS=$OPTS"-v ";;
16
 
        V)      OPTS=$OPTS"-V ";;
17
 
        f)      DBOPTS=" -f";;
18
 
        l)      DBOPTS=$DBOPTS" -l "$OPTARG" ";;
19
 
        \?)     echo $USAGE 1>&2
20
 
                exit 2
21
 
                ;;
22
 
        esac
23
 
done
24
 
set -- extra $@
25
 
shift $OPTIND
26
 
case $# in
27
 
        1)      xfs_db64$DBOPTS -r -p xfs_ncheck64 -c "blockget -ns" -c "ncheck$OPTS" $1
28
 
                status=$?
29
 
                ;;
30
 
        *)      echo $USAGE 1>&2
31
 
                exit 2
32
 
                ;;
33
 
esac
34
 
exit $status