aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2025-05-23 15:10:06 +0200
committerStefano Brivio <sbrivio@redhat.com>2025-06-06 10:46:29 +0200
commitbcb559600545498ae7598617ef82d2810937132c (patch)
treef980e6c024845add190a7fe8a6720b323a43a3bd
parent2c883498b58a3dab702b3376a2ca828e61d3283d (diff)
downloadpasst-bcb559600545498ae7598617ef82d2810937132c.tar
passt-bcb559600545498ae7598617ef82d2810937132c.tar.gz
passt-bcb559600545498ae7598617ef82d2810937132c.tar.bz2
passt-bcb559600545498ae7598617ef82d2810937132c.tar.lz
passt-bcb559600545498ae7598617ef82d2810937132c.tar.xz
passt-bcb559600545498ae7598617ef82d2810937132c.tar.zst
passt-bcb559600545498ae7598617ef82d2810937132c.zip
passt-repair: Fix missing newlines in error messages
Signed-off-by: Stefano Brivio <sbrivio@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
-rw-r--r--passt-repair.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/passt-repair.c b/passt-repair.c
index ff1c44f..8c59d7e 100644
--- a/passt-repair.c
+++ b/passt-repair.c
@@ -83,7 +83,7 @@ int main(int argc, char **argv)
prog.filter = filter_repair;
if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) ||
prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog)) {
- fprintf(stderr, "Failed to apply seccomp filter");
+ fprintf(stderr, "Failed to apply seccomp filter\n");
_exit(1);
}
@@ -134,13 +134,13 @@ int main(int argc, char **argv)
n = read(fd, buf, sizeof(buf));
if (n < 0) {
- fprintf(stderr, "inotify read: %i", errno);
+ fprintf(stderr, "inotify read: %i\n", errno);
_exit(1);
}
buf[n - 1] = '\0';
if (n < (ssize_t)sizeof(*ev)) {
- fprintf(stderr, "Short inotify read: %zi", n);
+ fprintf(stderr, "Short inotify read: %zi\n", n);
continue;
}
@@ -176,7 +176,7 @@ int main(int argc, char **argv)
}
if (ret <= 0 || ret >= (int)sizeof(a.sun_path)) {
- fprintf(stderr, "Invalid socket path");
+ fprintf(stderr, "Invalid socket path\n");
_exit(2);
}
@@ -245,8 +245,8 @@ loop:
for (i = 0; i < n; i++) {
if (setsockopt(fds[i], SOL_TCP, TCP_REPAIR, &op, sizeof(op))) {
fprintf(stderr,
- "Setting TCP_REPAIR to %i on socket %i: %s", op,
- fds[i], strerror(errno));
+ "Setting TCP_REPAIR to %i on socket %i: %s\n",
+ op, fds[i], strerror(errno));
_exit(1);
}