summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>1999-01-22 10:57:03 +0000
committerdillon <dillon@FreeBSD.org>1999-01-22 10:57:03 +0000
commit34551cfe0574d8c2ec189c32e802397f0addef59 (patch)
treea4e01b24cbcb19e411b4ccab56953a7b64cd6d88 /lib
parentd5b5a4c793886f86de6a0904a7295cf15fc09094 (diff)
downloadFreeBSD-src-34551cfe0574d8c2ec189c32e802397f0addef59.zip
FreeBSD-src-34551cfe0574d8c2ec189c32e802397f0addef59.tar.gz
Add SWIF_DEV_PREFIX flag to add "/dev/..." to device name.
Diffstat (limited to 'lib')
-rw-r--r--lib/libkvm/kvm_getswapinfo.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libkvm/kvm_getswapinfo.c b/lib/libkvm/kvm_getswapinfo.c
index 54663e4..32b1672 100644
--- a/lib/libkvm/kvm_getswapinfo.c
+++ b/lib/libkvm/kvm_getswapinfo.c
@@ -14,7 +14,7 @@ static const char copyright[] =
#ifndef lint
static const char rcsid[] =
- "$Id: kvm_getswapinfo.c,v 1.38 1999/01/21 08:08:55 dillon Exp $";
+ "$Id: kvm_getswapinfo.c,v 1.1 1999/01/22 10:36:04 dillon Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -198,7 +198,8 @@ kvm_getswapinfo(
snprintf(
swap_ary[i].ksw_devname,
sizeof(swap_ary[i].ksw_devname),
- "%s",
+ "%s%s",
+ ((flags & SWIF_DEV_PREFIX) ? "/dev/" : ""),
devname(swinfo.sw_dev, S_IFBLK)
);
}
OpenPOWER on IntegriCloud