shithub: riscv

Download patch

ref: 065cf0b708be75e84e568261a044d66286ef6e3d
parent: e7715ce2c669fd4ac95dec7851c71136aeb0053f
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){