]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_io: move inode command arg handling to top
authorEric Sandeen <sandeen@sandeen.net>
Sun, 2 Oct 2016 23:47:47 +0000 (10:47 +1100)
committerDave Chinner <david@fromorbit.com>
Sun, 2 Oct 2016 23:47:47 +0000 (10:47 +1100)
commit5afa1b2d0f2c4039c9b580cbe6f3acc96a3f9663
treed2b67d87642d2057e3641aaedd301b683126e0c7
parentd0e8bb48b7a607d849d21f9b74d62ba460cef006
xfs_io: move inode command arg handling to top

As it stands, collecting the inode number and testing args validity
is all tangled up; for example the test for "-n" having no inode is
buried in an else after a large code block which handles something
else.

Get inode number argument collection and testing out of the way
before doing anything else.

Clean up the error message if a non-numeric inode arg is given.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
io/open.c