From: Darrick J. Wong Date: Wed, 24 Feb 2021 00:09:28 +0000 (-0500) Subject: xfs_admin: clean up string quoting X-Git-Tag: v5.11.0-rc1~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b71bedbf5a32e277c03ebf6cf1f1c5d93c314dd7;p=thirdparty%2Fxfsprogs-dev.git xfs_admin: clean up string quoting Clean up the string quoting in this script so that we don't trip over users feeding us arguments like "/dev/sd ha ha ha lol". Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Reviewed-by: Allison Henderson Signed-off-by: Eric Sandeen --- diff --git a/db/xfs_admin.sh b/db/xfs_admin.sh index bd325da2f..71a9aa98f 100755 --- a/db/xfs_admin.sh +++ b/db/xfs_admin.sh @@ -43,7 +43,7 @@ case $# in if [ -n "$DB_OPTS" ] then - eval xfs_db -x -p xfs_admin $DB_OPTS $1 + eval xfs_db -x -p xfs_admin $DB_OPTS "$1" status=$? fi if [ -n "$REPAIR_OPTS" ] @@ -53,7 +53,7 @@ case $# in # running xfs_admin. # Ideally, we need to improve the output behaviour # of repair for this purpose (say a "quiet" mode). - eval xfs_repair $REPAIR_OPTS $1 2> /dev/null + eval xfs_repair $REPAIR_OPTS "$1" 2> /dev/null status=`expr $? + $status` if [ $status -ne 0 ] then