]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fallocate: forbid --posix with special options
authorChris Hofstaedtler <zeha@debian.org>
Tue, 21 Jan 2025 17:58:48 +0000 (18:58 +0100)
committerChris Hofstaedtler <chris@hofstaedtler.name>
Wed, 22 Jan 2025 18:26:50 +0000 (19:26 +0100)
Option --posix picks posix_fallocate, which does not have a
mode flag. Forbid using any options that set mode flags when
also giving --posix.

Signed-off-by: Chris Hofstaedtler <zeha@debian.org>
sys-utils/fallocate.1.adoc
sys-utils/fallocate.c

index edcca8e0af92787e520629d18e8827c9da7daedb..44ee0ef4c26521528dd12daf0f50beafe88aaa07 100644 (file)
@@ -28,7 +28,7 @@ The exit status returned by *fallocate* is 0 on success and 1 on failure.
 
 The _length_ and _offset_ arguments may be followed by the multiplicative suffixes KiB (=1024), MiB (=1024*1024), and so on for GiB, TiB, PiB, EiB, ZiB, and YiB (the "iB" is optional, e.g., "K" has the same meaning as "KiB") or the suffixes KB (=1000), MB (=1000*1000), and so on for GB, TB, PB, EB, ZB, and YB.
 
-The options *--collapse-range*, *--dig-holes*, *--punch-hole*, and *--zero-range* are mutually exclusive.
+The options *--collapse-range*, *--dig-holes*, *--punch-hole*, *--zero-range* and *--posix* are mutually exclusive.
 
 *-c*, *--collapse-range*::
 Removes a byte range from a file, without leaving a hole. The byte range to be collapsed starts at _offset_ and continues for _length_ bytes. At the completion of the operation, the contents of the file starting at the location __offset__+_length_ will be appended at the location _offset_, and the file will be _length_ bytes smaller. The option *--keep-size* may not be specified for the collapse-range operation.
index ac7c687f22f093a9b866f96d5cf4f16d6c518736..ded62f4b033765e7ebcf17733bfbe3beb0c9488e 100644 (file)
@@ -315,7 +315,7 @@ int main(int argc, char **argv)
        static const ul_excl_t excl[] = {       /* rows and cols in ASCII order */
                { 'c', 'd', 'p', 'z' },
                { 'c', 'n' },
-               { 'x', 'c', 'd', 'i', 'n', 'p', 'z'},
+               { 'c', 'd', 'i', 'n', 'p', 'x', 'z'},
                { 0 }
        };
        int excl_st[ARRAY_SIZE(excl)] = UL_EXCL_STATUS_INIT;