]> git.lizzy.rs Git - plan9front.git/commitdiff
venti: warn when opening /dev/swap fails
authorNoam Preil <noam@pixelhero.dev>
Mon, 21 Jun 2021 03:56:14 +0000 (03:56 +0000)
committerNoam Preil <noam@pixelhero.dev>
Mon, 21 Jun 2021 03:56:14 +0000 (03:56 +0000)
sys/src/cmd/venti/srv/venti.c

index fd0ff5c0773affe499b4ccd40f7645207c4200cf..8a631314aa57706a142207c2dbf8dbc6fcee6cdd 100755 (executable)
@@ -55,6 +55,8 @@ freemem(void)
                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){