]> git.ipfire.org Git - thirdparty/util-linux.git/commit
fallocate: fix the way to evaluate values returned from posix_fallocate
authorMasatake YAMATO <yamato@redhat.com>
Fri, 19 Jan 2024 14:47:30 +0000 (23:47 +0900)
committerMasatake YAMATO <yamato@redhat.com>
Fri, 19 Jan 2024 14:47:30 +0000 (23:47 +0900)
commitfa738e31cdc8b678c20c0c42d7432927db2640c2
treeead13559cd4ac8488aff82ca63aaf3a24e6504a7
parent6c639c8408194c74055a188d5b2707a3b5314f5e
fallocate: fix the way to evaluate values returned from posix_fallocate

Unlike Linux native system calls, posix_fallocate doesn't return -1
whe an error occurs; it returns a errno value directly.

The bug of the original code was reported by @Yugend on #2714.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
sys-utils/fallocate.c