]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - db/xfs_ncheck.sh
libxfs: fix xfs_trans_alloc_empty namespace
[thirdparty/xfsprogs-dev.git] / db / xfs_ncheck.sh
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_ncheck [-sfV] [-l logdev] [-i ino]... special"
9
10
11 while getopts "b:fi:l:svV" c
12 do
13 case $c in
14 s) OPTS=$OPTS"-s ";;
15 i) OPTS=$OPTS"-i "$OPTARG" ";;
16 v) OPTS=$OPTS"-v ";;
17 f) DBOPTS=$DBOPTS" -f";;
18 l) DBOPTS=$DBOPTS" -l "$OPTARG" ";;
19 V) xfs_db -p xfs_ncheck -V
20 status=$?
21 exit $status
22 ;;
23 \?) echo $USAGE 1>&2
24 exit 2
25 ;;
26 esac
27 done
28 set -- extra $@
29 shift $OPTIND
30 case $# in
31 1) xfs_db$DBOPTS -r -p xfs_ncheck -c "blockget -ns" -c "ncheck$OPTS" $1
32 status=$?
33 ;;
34 *) echo $USAGE 1>&2
35 exit 2
36 ;;
37 esac
38 exit $status