]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blame - db/xfs_ncheck.sh
Update copyright/license notices to match SGI legal prefered boilerplate.
[thirdparty/xfsprogs-dev.git] / db / xfs_ncheck.sh
CommitLineData
2bd0ea18
NS
1#!/bin/sh -f
2#
0d3e0b37 3# Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved.
dfc130f3 4#
2bd0ea18
NS
5
6OPTS=" "
add013da
NS
7DBOPTS=" "
8USAGE="usage: xfs_ncheck [-sfV] [-l logdev] [-i ino]... special"
2bd0ea18
NS
9
10
add013da 11while getopts "b:fi:l:svV" c
2bd0ea18
NS
12do
13 case $c in
14 s) OPTS=$OPTS"-s ";;
15 i) OPTS=$OPTS"-i "$OPTARG" ";;
9440d84d
NS
16 v) OPTS=$OPTS"-v ";;
17 V) OPTS=$OPTS"-V ";;
add013da
NS
18 f) DBOPTS=$DBOPTS" -f";;
19 l) DBOPTS=$DBOPTS" -l "$OPTARG" ";;
2bd0ea18
NS
20 \?) echo $USAGE 1>&2
21 exit 2
22 ;;
23 esac
24done
25set -- extra $@
26shift $OPTIND
27case $# in
add013da 28 1) xfs_db$DBOPTS -r -p xfs_ncheck -c "blockget -ns" -c "ncheck$OPTS" $1
2bd0ea18
NS
29 status=$?
30 ;;
31 *) echo $USAGE 1>&2
32 exit 2
33 ;;
34esac
35exit $status