summaryrefslogtreecommitdiffstats
path: root/usr.sbin/makefs
diff options
context:
space:
mode:
authornatano <natano@openbsd.org>2016-10-22 17:15:28 +0000
committernatano <natano@openbsd.org>2016-10-22 17:15:28 +0000
commitb35c7f730d82e39168f18dd32c7f2b8fac27d987 (patch)
treea29db947a13f2714be54c6f3ad15d02d8126f561 /usr.sbin/makefs
parentInclude our own <ufs/ufs/dinode.h>, <ufs/ufs/dir.h> and <ufs/ffs/fs.h> (diff)
downloadwireguard-openbsd-b35c7f730d82e39168f18dd32c7f2b8fac27d987.tar.xz
wireguard-openbsd-b35c7f730d82e39168f18dd32c7f2b8fac27d987.zip
s/panic/errx/ This is userland.
Diffstat (limited to 'usr.sbin/makefs')
-rw-r--r--usr.sbin/makefs/ffs.c13
-rw-r--r--usr.sbin/makefs/ffs/ffs_extern.h6
-rw-r--r--usr.sbin/makefs/ffs/ffs_subr.c13
3 files changed, 8 insertions, 24 deletions
diff --git a/usr.sbin/makefs/ffs.c b/usr.sbin/makefs/ffs.c
index 16908119d05..3c1d8bdf5af 100644
--- a/usr.sbin/makefs/ffs.c
+++ b/usr.sbin/makefs/ffs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs.c,v 1.12 2016/10/22 16:51:52 natano Exp $ */
+/* $OpenBSD: ffs.c,v 1.13 2016/10/22 17:15:28 natano Exp $ */
/* $NetBSD: ffs.c,v 1.66 2015/12/21 00:58:08 christos Exp $ */
/*
@@ -1091,14 +1091,3 @@ ffs_write_inode(union dinode *dp, uint32_t ino, const fsinfo_t *fsopts)
ffs_wtfs(d, fs->fs_bsize, buf, fsopts);
free(buf);
}
-
-void
-panic(const char *fmt, ...)
-{
- va_list ap;
-
- va_start(ap, fmt);
- vwarnx(fmt, ap);
- va_end(ap);
- exit(1);
-}
diff --git a/usr.sbin/makefs/ffs/ffs_extern.h b/usr.sbin/makefs/ffs/ffs_extern.h
index 51bbff8fdef..48185313da4 100644
--- a/usr.sbin/makefs/ffs/ffs_extern.h
+++ b/usr.sbin/makefs/ffs/ffs_extern.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_extern.h,v 1.5 2016/10/17 13:45:38 natano Exp $ */
+/* $OpenBSD: ffs_extern.h,v 1.6 2016/10/22 17:15:28 natano Exp $ */
/* $NetBSD: ffs_extern.h,v 1.6 2003/08/07 11:25:33 agc Exp $ */
/* From: NetBSD: ffs_extern.h,v 1.19 2001/08/17 02:18:48 lukem Exp */
@@ -45,10 +45,6 @@ struct indir {
int in_exists; /* Flag if the block exists. */
};
- /* ffs.c */
-void panic(const char *, ...)
- __attribute__((__noreturn__,__format__(__printf__,1,2)));
-
/* ffs_alloc.c */
struct inode;
int ffs_alloc(struct inode *, daddr_t, daddr_t, int, daddr_t *);
diff --git a/usr.sbin/makefs/ffs/ffs_subr.c b/usr.sbin/makefs/ffs/ffs_subr.c
index 9723e6c4732..bf3e291d8e7 100644
--- a/usr.sbin/makefs/ffs/ffs_subr.c
+++ b/usr.sbin/makefs/ffs/ffs_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_subr.c,v 1.2 2016/10/22 16:51:52 natano Exp $ */
+/* $OpenBSD: ffs_subr.c,v 1.3 2016/10/22 17:15:28 natano Exp $ */
/* $NetBSD: ffs_subr.c,v 1.49 2016/05/07 11:59:08 maxv Exp $ */
/*
@@ -37,12 +37,11 @@
#include <ufs/ufs/dinode.h>
#include <ufs/ffs/fs.h>
+#include <err.h>
+
#include "ffs/ufs_bswap.h"
#include "ffs/ffs_extern.h"
-void panic(const char *, ...)
- __attribute__((__noreturn__,__format__(__printf__,1,2)));
-
/*
* block operations
@@ -69,7 +68,7 @@ ffs_isblock(struct fs *fs, u_char *cp, int32_t h)
mask = 0x01 << (h & 0x7);
return ((cp[h >> 3] & mask) == mask);
default:
- panic("ffs_isblock: unknown fs_fragshift %d",
+ errx(1, "ffs_isblock: unknown fs_fragshift %d",
(int)fs->fs_fragshift);
}
}
@@ -95,7 +94,7 @@ ffs_clrblock(struct fs *fs, u_char *cp, int32_t h)
cp[h >> 3] &= ~(0x01 << (h & 0x7));
return;
default:
- panic("ffs_clrblock: unknown fs_fragshift %d",
+ errx(1, "ffs_clrblock: unknown fs_fragshift %d",
(int)fs->fs_fragshift);
}
}
@@ -121,7 +120,7 @@ ffs_setblock(struct fs *fs, u_char *cp, int32_t h)
cp[h >> 3] |= (0x01 << (h & 0x7));
return;
default:
- panic("ffs_setblock: unknown fs_fragshift %d",
+ errx(1, "ffs_setblock: unknown fs_fragshift %d",
(int)fs->fs_fragshift);
}
}