]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_admin: don't add '=1' when building repair command line for -O
authorDarrick J. Wong <djwong@kernel.org>
Fri, 12 Mar 2021 18:57:27 +0000 (13:57 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Fri, 12 Mar 2021 18:57:27 +0000 (13:57 -0500)
Geert Hendrickx reported an inconsistency between the xfs_admin manpage
and its behavior -- the documentation says that users must provide the
status explicitly, but the script injects '=1' anyway.  While this seems
to work with the glibc getsubopt, it's a bit ugly and isn't consistent
with the docs.

So, get rid of that extra two bytes.

Reported-by: Geert Hendrickx <geert@hendrickx.be>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
db/xfs_admin.sh

index 7a467dbe8dfeec731e6afaf50424e908a97725ed..02f34b7377d006e23e75cb219ba285162271f709 100755 (executable)
@@ -20,7 +20,7 @@ do
        j)      DB_OPTS=$DB_OPTS" -c 'version log2'";;
        l)      DB_OPTS=$DB_OPTS" -r -c label";;
        L)      DB_OPTS=$DB_OPTS" -c 'label "$OPTARG"'";;
-       O)      REPAIR_OPTS=$REPAIR_OPTS" -c $OPTARG=1";;
+       O)      REPAIR_OPTS=$REPAIR_OPTS" -c $OPTARG";;
        p)      DB_OPTS=$DB_OPTS" -c 'version projid32bit'";;
        r)      REPAIR_DEV_OPTS=" -r '$OPTARG'";;
        u)      DB_OPTS=$DB_OPTS" -r -c uuid";;