]>
git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - db/xfs_admin.sh
3 # Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved.
9 USAGE
="Usage: xfs_admin [-efjlpuV] [-c 0|1] [-L label] [-U uuid] device"
11 while getopts "efjlpuc:L:U:V" c
14 c
) REPAIR_OPTS
=$REPAIR_OPTS" -c lazycount="$OPTARG;;
15 e
) DB_OPTS
=$DB_OPTS" -c 'version extflg'";;
16 f
) DB_OPTS
=$DB_OPTS" -f";;
17 j
) DB_OPTS
=$DB_OPTS" -c 'version log2'";;
18 l
) DB_OPTS
=$DB_OPTS" -r -c label";;
19 L
) DB_OPTS
=$DB_OPTS" -c 'label "$OPTARG"'";;
20 p
) DB_OPTS
=$DB_OPTS" -c 'version projid32bit'";;
21 u
) DB_OPTS
=$DB_OPTS" -r -c uuid";;
22 U
) DB_OPTS
=$DB_OPTS" -c 'uuid "$OPTARG"'";;
23 V
) xfs_db
-p xfs_admin
-V
35 1) if [ -n "$DB_OPTS" ]
37 eval xfs_db
-x -p xfs_admin
$DB_OPTS $1
40 if [ -n "$REPAIR_OPTS" ]
42 # Hide normal repair output which is sent to stderr
43 # assuming the filesystem is fine when a user is
45 # Ideally, we need to improve the output behaviour
46 # of repair for this purpose (say a "quiet" mode).
47 eval xfs_repair
$REPAIR_OPTS $1 2> /dev
/null
48 status
=`expr $? + $status`
51 echo "Conversion failed, is the filesystem unmounted?"