summaryrefslogtreecommitdiffstats
path: root/usr.bin/gcore
diff options
context:
space:
mode:
authorcharnier <charnier@FreeBSD.org>2002-04-12 21:36:54 +0000
committercharnier <charnier@FreeBSD.org>2002-04-12 21:36:54 +0000
commit3fbc0658fd4982e90fc6c85559184e038f9fd3d9 (patch)
tree200236d13c11ff03bbd5268b1e654c38fa28e8f1 /usr.bin/gcore
parent675dc11ac9d13d2b3e12fc86009fbc140140fa1e (diff)
downloadFreeBSD-src-3fbc0658fd4982e90fc6c85559184e038f9fd3d9.zip
FreeBSD-src-3fbc0658fd4982e90fc6c85559184e038f9fd3d9.tar.gz
Do not print error message twice.
Diffstat (limited to 'usr.bin/gcore')
-rw-r--r--usr.bin/gcore/aoutcore.c8
-rw-r--r--usr.bin/gcore/gcore.c8
2 files changed, 10 insertions, 6 deletions
diff --git a/usr.bin/gcore/aoutcore.c b/usr.bin/gcore/aoutcore.c
index c6e29d1..00f2967 100644
--- a/usr.bin/gcore/aoutcore.c
+++ b/usr.bin/gcore/aoutcore.c
@@ -41,10 +41,11 @@ static const char copyright[] =
#if 0
static char sccsid[] = "@(#)gcore.c 8.2 (Berkeley) 9/23/93";
#endif
-static const char rcsid[] =
- "$FreeBSD$";
#endif /* not lint */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
/*
* Originally written by Eric Cooper in Fall 1981.
* Inspired by a version 6 program by Len Levin, 1978.
@@ -56,6 +57,7 @@ static const char rcsid[] =
* Engineering group at Lawrence Berkeley Laboratory under DARPA
* contract BG 91-66 and contributed to Berkeley.
*/
+
#include <sys/param.h>
#include <sys/time.h>
#include <sys/stat.h>
@@ -284,7 +286,7 @@ datadump(efd, fd, kp, addr, npage)
if (cc != PAGE_SIZE) {
/* Try to read the page from the executable. */
if (lseek(efd, (off_t)addr + delta, SEEK_SET) == -1)
- err(1, "seek executable: %s", strerror(errno));
+ err(1, "seek executable");
cc = read(efd, buffer, sizeof(buffer));
if (cc != sizeof(buffer)) {
if (cc < 0)
diff --git a/usr.bin/gcore/gcore.c b/usr.bin/gcore/gcore.c
index c6e29d1..00f2967 100644
--- a/usr.bin/gcore/gcore.c
+++ b/usr.bin/gcore/gcore.c
@@ -41,10 +41,11 @@ static const char copyright[] =
#if 0
static char sccsid[] = "@(#)gcore.c 8.2 (Berkeley) 9/23/93";
#endif
-static const char rcsid[] =
- "$FreeBSD$";
#endif /* not lint */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
/*
* Originally written by Eric Cooper in Fall 1981.
* Inspired by a version 6 program by Len Levin, 1978.
@@ -56,6 +57,7 @@ static const char rcsid[] =
* Engineering group at Lawrence Berkeley Laboratory under DARPA
* contract BG 91-66 and contributed to Berkeley.
*/
+
#include <sys/param.h>
#include <sys/time.h>
#include <sys/stat.h>
@@ -284,7 +286,7 @@ datadump(efd, fd, kp, addr, npage)
if (cc != PAGE_SIZE) {
/* Try to read the page from the executable. */
if (lseek(efd, (off_t)addr + delta, SEEK_SET) == -1)
- err(1, "seek executable: %s", strerror(errno));
+ err(1, "seek executable");
cc = read(efd, buffer, sizeof(buffer));
if (cc != sizeof(buffer)) {
if (cc < 0)
OpenPOWER on IntegriCloud