]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_admin: correctly parse IO_OPTS parameters
authorCatherine Hoang <catherine.hoang@oracle.com>
Thu, 26 Jan 2023 00:33:10 +0000 (16:33 -0800)
committerCarlos Maiolino <cem@kernel.org>
Fri, 3 Feb 2023 12:55:02 +0000 (13:55 +0100)
Change exec to eval so that the IO_OPTS parameters are parsed correctly
when the parameters contain quotations.

Fixes: e7cd89b2da72 ("xfs_admin: get UUID of mounted filesystem")
Signed-off-by: Catherine Hoang <catherine.hoang@oracle.com>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
db/xfs_admin.sh

index b73fb3adc2395d84854f7527f4cdf6305c17b144..3a7f44ea2519467643e7a5fabc31ca992d88a2d0 100755 (executable)
@@ -69,7 +69,8 @@ case $# in
                        fi
 
                        if [ -n "$IO_OPTS" ]; then
-                               exec xfs_io -p xfs_admin $IO_OPTS "$mntpt"
+                               eval xfs_io -p xfs_admin $IO_OPTS "$mntpt"
+                               exit $?
                        fi
                fi