public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [PATCH] passt-repair: Fix missing newlines in error messages
@ 2025-06-04 10:32 Stefano Brivio
  2025-06-04 11:01 ` David Gibson
  0 siblings, 1 reply; 2+ messages in thread
From: Stefano Brivio @ 2025-06-04 10:32 UTC (permalink / raw)
  To: passt-dev

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
---
 passt-repair.c | 12 ++++++------
 1 file 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);
 		}
 
-- 
@@ -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);
 		}
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] passt-repair: Fix missing newlines in error messages
  2025-06-04 10:32 [PATCH] passt-repair: Fix missing newlines in error messages Stefano Brivio
@ 2025-06-04 11:01 ` David Gibson
  0 siblings, 0 replies; 2+ messages in thread
From: David Gibson @ 2025-06-04 11:01 UTC (permalink / raw)
  To: Stefano Brivio; +Cc: passt-dev

[-- Attachment #1: Type: text/plain, Size: 2030 bytes --]

On Wed, Jun 04, 2025 at 12:32:50PM +0200, Stefano Brivio wrote:
> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>

Reviewed-by: David Gibson <david@gibson.dropbear.id.au>

> ---
>  passt-repair.c | 12 ++++++------
>  1 file 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);
>  		}
>  

-- 
David Gibson (he or they)	| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you, not the other way
				| around.
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-06-04 11:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-04 10:32 [PATCH] passt-repair: Fix missing newlines in error messages Stefano Brivio
2025-06-04 11:01 ` David Gibson

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).