]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
idmapped-mounts: switch to getopt_long_only()
authorChristian Brauner <christian.brauner@ubuntu.com>
Sat, 14 Aug 2021 10:47:59 +0000 (12:47 +0200)
committerEryu Guan <guaneryu@gmail.com>
Sun, 22 Aug 2021 11:48:28 +0000 (19:48 +0800)
commit935ea18dc68ebc902daa8d12af7b6fcc72719cdc
tree6bad6bd748a1a7493ee3aa32815e91032d7f9095
parent3507237efef9d2083030ede130a83f423d3eb3fe
idmapped-mounts: switch to getopt_long_only()

We're not using the shortopts anywhere anyway  and shouldn't encourage
using shortopts.  It's much more descriptive to see:

$here/src/idmapped-mounts/idmapped-mounts \
        --test-btrfs \
        --device "$TEST_DEV" \
        --mountpoint "$TEST_DIR" \
        --scratch-device "$SCRATCH_DEV" \
        --scratch-mountpoint "$SCRATCH_MNT"
        --fstype "$FSTYP"

in a test than it is to see:

$here/src/idmapped-mounts/idmapped-mounts \
        -b
        -d "$TEST_DEV" \
        -m "$TEST_DIR" \
        -s "$SCRATCH_DEV" \
        -a "$SCRATCH_MNT" \
        -f "$FSTYP"

In the second case one has to go consult the source code to make sure
that the correct option is passed. In the first case one can just see it
directly.

Cc: fstests@vger.kernel.org
Suggested-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
src/idmapped-mounts/idmapped-mounts.c