]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
sfdisk: correct --json --dump false exclusive
authorDimitri John Ledkov <xnox@ubuntu.com>
Wed, 4 Nov 2020 12:35:38 +0000 (12:35 +0000)
committerKarel Zak <kzak@redhat.com>
Fri, 13 Nov 2020 11:35:19 +0000 (12:35 +0100)
`--json` implies `--dump`, thus `--json --dump` must be
allowed. `--list-free` is incompatible with `--dump`, and thus also
with `--json`. Currently `--json --dump` is prohibited, even though
`--list-free` is not specified at all.

Regression introduced in 03154d2cf25c1d5ce908da9e72d324004b8d5722.

Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com>
disk-utils/sfdisk.c

index 2e9e7cd74c09dc5001f7ff41489dd199402347df..a1da9c7478207ef5f55a7c9e956c7e307095efab 100644 (file)
@@ -2163,7 +2163,8 @@ int main(int argc, char *argv[])
                { NULL, 0, NULL, 0 },
        };
        static const ul_excl_t excl[] = {       /* rows and cols in ASCII order */
-               { 'F','J','d'},                 /* --list-free --json --dump */
+               { 'F','d'},                     /* --list-free --dump */
+               { 'F','J'},                     /* --list-free --json */
                { 's','u'},                     /* --show-size --unit */
                { 0 }
        };