summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
Diffstat (limited to 'sbin')
-rw-r--r--sbin/dumpfs/Makefile5
-rw-r--r--sbin/dumpfs/dumpfs.c7
2 files changed, 8 insertions, 4 deletions
diff --git a/sbin/dumpfs/Makefile b/sbin/dumpfs/Makefile
index 5875e80bddd..3c2c70d2d69 100644
--- a/sbin/dumpfs/Makefile
+++ b/sbin/dumpfs/Makefile
@@ -1,6 +1,9 @@
-# $OpenBSD: Makefile,v 1.3 1997/09/21 11:36:20 deraadt Exp $
+# $OpenBSD: Makefile,v 1.4 2011/02/28 00:12:19 halex Exp $
PROG= dumpfs
MAN= dumpfs.8
+LDADD= -lutil
+DPADD= ${LIBUTIL}
+
.include <bsd.prog.mk>
diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c
index 93904c1f191..86b7afe604d 100644
--- a/sbin/dumpfs/dumpfs.c
+++ b/sbin/dumpfs/dumpfs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dumpfs.c,v 1.27 2009/10/27 23:59:32 deraadt Exp $ */
+/* $OpenBSD: dumpfs.c,v 1.28 2011/02/28 00:12:19 halex Exp $ */
/*
* Copyright (c) 2002 Networks Associates Technology, Inc.
@@ -52,6 +52,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
+#include <util.h>
union {
struct fs fs;
@@ -70,7 +71,7 @@ long dev_bsize;
int dumpfs(int, const char *);
int dumpcg(const char *, int, int);
int marshal(const char *);
-int open_disk(const char *name);
+int open_disk(const char *);
void pbits(void *, int);
__dead void usage(void);
@@ -124,7 +125,7 @@ open_disk(const char *name)
ssize_t n;
/* XXX - should retry w/raw device on failure */
- if ((fd = open(name, O_RDONLY, 0)) < 0) {
+ if ((fd = opendev(name, O_RDONLY, 0, NULL)) < 0) {
warn("%s", name);
return(-1);
}