[PATCH 1/1] syslogd: Add gzip feature to the rotated files
Csókás Bence
csokas.bence at prolan.hu
Fri Apr 11 13:07:48 UTC 2025
Hi,
On 2025. 04. 10. 15:15, Dmitry Smirnov wrote:
> ---
> sysklogd/syslogd.c | 18 ++++++++++++++----
> 1 file changed, 14 insertions(+), 4 deletions(-)
You do not need to send a cover letter for a single patch, you can just
send it whole. That way the message and base commit information isn't
separated from the patch.
> /* newFile == "f.0" now */
> - rename(log_file->path, newFile);
> + if (option_mask32 & OPT_gziprotated) // -z
> + system(xasprintf("gzip -c %s > %s", log_file->path, newFile));
You should free() the return value of xasprintf()
> + else
> + rename(log_file->path, newFile);
> }
>
> /* We may or may not have just renamed the file away;
Bence
More information about the busybox
mailing list