mirror of
https://github.com/systemd/systemd.git
synced 2024-12-22 17:35:35 +03:00
copy: change error code when hitting copy limit to EFBIG
After all, this is about files, not arguments, hence EFBIG is more appropriate than E2BIG
This commit is contained in:
parent
cda134ab1e
commit
84ee096044
@ -329,7 +329,7 @@ static int save_external_coredump(
|
||||
}
|
||||
|
||||
r = copy_bytes(STDIN_FILENO, fd, arg_process_size_max);
|
||||
if (r == -E2BIG) {
|
||||
if (r == -EFBIG) {
|
||||
log_error("Coredump of %s (%s) is larger than configured processing limit, refusing.", info[INFO_PID], info[INFO_COMM]);
|
||||
goto fail;
|
||||
} else if (IN_SET(r, -EDQUOT, -ENOSPC)) {
|
||||
|
@ -37,7 +37,7 @@ int copy_bytes(int fdf, int fdt, off_t max_bytes) {
|
||||
if (max_bytes != (off_t) -1) {
|
||||
|
||||
if (max_bytes <= 0)
|
||||
return -E2BIG;
|
||||
return -EFBIG;
|
||||
|
||||
if ((off_t) m > max_bytes)
|
||||
m = (size_t) max_bytes;
|
||||
|
Loading…
Reference in New Issue
Block a user