From b4f44c1118aa0abfb040d6177beda778f2125e1e Mon Sep 17 00:00:00 2001 From: drochner Date: Wed, 18 Sep 2002 10:18:17 +0000 Subject: [PATCH] print something sensible on -z if no dump device is set --- sbin/swapctl/swapctl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sbin/swapctl/swapctl.c b/sbin/swapctl/swapctl.c index b8329b2501b6..795fad7618c9 100644 --- a/sbin/swapctl/swapctl.c +++ b/sbin/swapctl/swapctl.c @@ -1,4 +1,4 @@ -/* $NetBSD: swapctl.c,v 1.20 2002/06/21 09:04:16 jdolecek Exp $ */ +/* $NetBSD: swapctl.c,v 1.21 2002/09/18 10:18:17 drochner Exp $ */ /* * Copyright (c) 1996, 1997, 1999 Matthew R. Green @@ -409,6 +409,8 @@ get_dumpdev() if (swapctl(SWAP_GETDUMPDEV, &dev, NULL) == -1) warn("could not get dump device"); + else if (dev == NODEV) + printf("no dump device set\n"); else { name = devname(dev, S_IFBLK); printf("dump device is ");