git: 9front

Download patch

ref: dcc4a5f5cd64195932f735e5b2ba04f0d8ef7d16
parent: 6da36b9a2d40ee49db7406c1cf03ee2ef60ecf71
author: Noam Preil <noam@pixelhero.dev>
date: Sun Jun 20 23:56:14 EDT 2021

venti: warn when opening /dev/swap fails

--- a/sys/src/cmd/venti/srv/venti.c
+++ b/sys/src/cmd/venti/srv/venti.c
@@ -55,6 +55,8 @@
 		Bterm(bp);
 		if (pgsize > 0 && userpgs > 0 && userused > 0)
 			size = (userpgs - userused) * pgsize;
+	} else {
+		fprint(2, "%s: failed to open /dev/swap\n", argv0);
 	}
 	/* cap it to keep the size within 32 bits */
 	if (size >= 3840UL * 1024 * 1024){
--