shithub: gefs

Download patch

ref: 20adcc7d9b12ff6b4f42275c5a10aff8d2d80db7
parent: 7f83f23bda5459b0a071b6cbcb9a11dedfabe433
author: Michael Forney <mforney@mforney.org>
date: Tue Feb 8 18:20:56 EST 2022

fs: add newline when printing fshangup messages

--- a/fs.c
+++ b/fs.c
@@ -153,11 +153,13 @@
 static void
 fshangup(int fd, char *fmt, ...)
 {
+	char buf[ERRMAX];
 	va_list ap;
 
 	va_start(ap, fmt);
-	vfprint(2, fmt, ap);
+	vsnprint(buf, sizeof(buf), fmt, ap);
 	va_end(ap);
+	fprint(2, "%s\n", buf);
 	close(fd);
 	abort();
 }