-# $OpenBSD: Makefile,v 1.3 1996/10/20 08:36:22 tholo Exp $
+# $OpenBSD: Makefile,v 1.4 1996/12/04 01:31:10 deraadt Exp $
# $NetBSD: Makefile,v 1.14 1996/09/27 22:38:37 christos Exp $
PROG= fsck
SRCS= fsck.c fsutil.c preen.c
MAN= fsck.8
+DPADD= ${LIBUTIL}
+LDADD= -lutil
.include <bsd.prog.mk>
-/* $OpenBSD: fsck.c,v 1.1 1996/10/20 08:36:24 tholo Exp $ */
+/* $OpenBSD: fsck.c,v 1.2 1996/12/04 01:31:11 deraadt Exp $ */
/* $NetBSD: fsck.c,v 1.7 1996/10/03 20:06:30 christos Exp $ */
/*
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <util.h>
#include "pathnames.h"
#include "fsutil.h"
for (; argc--; argv++) {
char *spec, *type;
- if ((fs = getfsfile(*argv)) == NULL &&
+ if (strncmp(*argv, "/dev/", 5) == 0 &&
+ (type = readlabelfs(*argv))) {
+ spec = *argv;
+ } else if ((fs = getfsfile(*argv)) == NULL &&
(fs = getfsspec(*argv)) == NULL) {
if (vfstype == NULL)
errx(1,
*argv);
spec = *argv;
type = vfstype;
- }
- else {
+ } else {
spec = fs->fs_spec;
type = fs->fs_vfstype;
if (BADTYPE(fs->fs_type))