summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1997-02-17 13:07:40 +0000
committerbde <bde@FreeBSD.org>1997-02-17 13:07:40 +0000
commit033e1785e7664ed7de93020f367aba9fc287f1cf (patch)
tree5c16a98f106431031d4f84130948acd3b563becf
parent2af96e689ce0de14ee79eef20ace76145bb8112d (diff)
parentcebb7ac61b41edc4c053a99cf7c9c173bf9318a4 (diff)
downloadFreeBSD-src-033e1785e7664ed7de93020f367aba9fc287f1cf.zip
FreeBSD-src-033e1785e7664ed7de93020f367aba9fc287f1cf.tar.gz
This commit was generated by cvs2svn to compensate for changes in r22839,
which included commits to RCS files with non-trunk default branches.
-rw-r--r--sbin/dumplfs/extern.h3
-rw-r--r--sbin/dumplfs/misc.c43
2 files changed, 9 insertions, 37 deletions
diff --git a/sbin/dumplfs/extern.h b/sbin/dumplfs/extern.h
index 82e87b2..d49a6de 100644
--- a/sbin/dumplfs/extern.h
+++ b/sbin/dumplfs/extern.h
@@ -30,10 +30,9 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * @(#)extern.h 8.1 (Berkeley) 6/5/93
+ * @(#)extern.h 8.2 (Berkeley) 4/28/95
*/
-void err __P((const char *, ...));
void get __P((int, off_t, void *, size_t));
extern char *special;
diff --git a/sbin/dumplfs/misc.c b/sbin/dumplfs/misc.c
index 861d0fd..34c5982 100644
--- a/sbin/dumplfs/misc.c
+++ b/sbin/dumplfs/misc.c
@@ -32,15 +32,17 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)misc.c 8.1 (Berkeley) 6/5/93";
+static char sccsid[] = "@(#)misc.c 8.2 (Berkeley) 4/28/95";
#endif /* not lint */
#include <sys/types.h>
-#include <unistd.h>
+
+#include <err.h>
#include <errno.h>
-#include <stdlib.h>
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#include "extern.h"
void
@@ -53,38 +55,9 @@ get(fd, off, p, len)
int rbytes;
if (lseek(fd, off, SEEK_SET) < 0)
- err("%s: %s", special, strerror(errno));
+ err(1, "%s", special);
if ((rbytes = read(fd, p, len)) < 0)
- err("%s: %s", special, strerror(errno));
+ err(1, "%s", special);
if (rbytes != len)
- err("%s: short read (%d, not %d)", special, rbytes, len);
-}
-
-#if __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
-void
-#if __STDC__
-err(const char *fmt, ...)
-#else
-err(fmt, va_alist)
- char *fmt;
- va_dcl
-#endif
-{
- va_list ap;
-#if __STDC__
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
- (void)fprintf(stderr, "dumplfs: ");
- (void)vfprintf(stderr, fmt, ap);
- va_end(ap);
- (void)fprintf(stderr, "\n");
- exit(1);
- /* NOTREACHED */
+ errx(1, "%s: short read (%d, not %d)", special, rbytes, len);
}
OpenPOWER on IntegriCloud