Deduplicate error string patterns (#37676)

I wanted to see if moving moving out constant string arguments our of
error messages results in smaller binary sizes. Turns out it does, but
the savings are not consistent. Sometimes we get a few kB in a single
binary, sometimes there is no size change.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2025-06-02 15:34:17 +02:00
committed by GitHub
44 changed files with 162 additions and 150 deletions
+1 -1
View File
@@ -1930,7 +1930,7 @@ int vsock_get_local_cid(unsigned *ret) {
vsock_fd = open("/dev/vsock", O_RDONLY|O_CLOEXEC);
if (vsock_fd < 0)
return log_debug_errno(errno, "Failed to open /dev/vsock: %m");
return log_debug_errno(errno, "Failed to open %s: %m", "/dev/vsock");
unsigned tmp;
if (ioctl(vsock_fd, IOCTL_VM_SOCKETS_GET_LOCAL_CID, ret ?: &tmp) < 0)