summaryrefslogtreecommitdiffstats
path: root/usr.bin/gcore
diff options
context:
space:
mode:
authorjdp <jdp@FreeBSD.org>1998-11-01 06:35:36 +0000
committerjdp <jdp@FreeBSD.org>1998-11-01 06:35:36 +0000
commit0ad104691f9438f9ebdedb8d13f45c113c9408bc (patch)
treeb0d526e661601b2bf381492d9cd9c65231d99dba /usr.bin/gcore
parent8bb5a3817f814c8be346d8357bd3b7d41d521ec3 (diff)
downloadFreeBSD-src-0ad104691f9438f9ebdedb8d13f45c113c9408bc.zip
FreeBSD-src-0ad104691f9438f9ebdedb8d13f45c113c9408bc.tar.gz
Fix errors detected by -Wformat.
Diffstat (limited to 'usr.bin/gcore')
-rw-r--r--usr.bin/gcore/aoutcore.c4
-rw-r--r--usr.bin/gcore/elfcore.c5
-rw-r--r--usr.bin/gcore/gcore.c4
3 files changed, 7 insertions, 6 deletions
diff --git a/usr.bin/gcore/aoutcore.c b/usr.bin/gcore/aoutcore.c
index b0d08f2..4702003 100644
--- a/usr.bin/gcore/aoutcore.c
+++ b/usr.bin/gcore/aoutcore.c
@@ -42,7 +42,7 @@ static const char copyright[] =
static char sccsid[] = "@(#)gcore.c 8.2 (Berkeley) 9/23/93";
#endif
static const char rcsid[] =
- "$Id: gcore.c,v 1.11 1998/10/19 19:42:18 jdp Exp $";
+ "$Id: gcore.c,v 1.12 1998/10/22 04:02:37 jdp Exp $";
#endif /* not lint */
/*
@@ -178,7 +178,7 @@ main(argc, argv)
if (exec.a_text != ptoa(ki->kp_eproc.e_vm.vm_tsize))
errx(1, "The executable %s does not belong to"
" process %d!\n"
- "Text segment size (in bytes): executable %d,"
+ "Text segment size (in bytes): executable %ld,"
" process %d", binfile, pid, exec.a_text,
ptoa(ki->kp_eproc.e_vm.vm_tsize));
data_offset = N_DATOFF(exec);
diff --git a/usr.bin/gcore/elfcore.c b/usr.bin/gcore/elfcore.c
index 1053841..af199ca 100644
--- a/usr.bin/gcore/elfcore.c
+++ b/usr.bin/gcore/elfcore.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: elfcore.c,v 1.1 1998/10/19 19:42:18 jdp Exp $
*/
#include <sys/param.h>
@@ -142,7 +142,8 @@ elf_coredump(int fd, pid_t pid)
err(1, "read from %s", memname);
if (ngot < nwant)
errx(1, "short read from %s:"
- " wanted %d, got %d\n", nwant, ngot);
+ " wanted %d, got %d\n", memname,
+ nwant, ngot);
ngot = write(fd, buf, nwant);
if (ngot == -1)
err(1, "write of segment %d failed", i);
diff --git a/usr.bin/gcore/gcore.c b/usr.bin/gcore/gcore.c
index b0d08f2..4702003 100644
--- a/usr.bin/gcore/gcore.c
+++ b/usr.bin/gcore/gcore.c
@@ -42,7 +42,7 @@ static const char copyright[] =
static char sccsid[] = "@(#)gcore.c 8.2 (Berkeley) 9/23/93";
#endif
static const char rcsid[] =
- "$Id: gcore.c,v 1.11 1998/10/19 19:42:18 jdp Exp $";
+ "$Id: gcore.c,v 1.12 1998/10/22 04:02:37 jdp Exp $";
#endif /* not lint */
/*
@@ -178,7 +178,7 @@ main(argc, argv)
if (exec.a_text != ptoa(ki->kp_eproc.e_vm.vm_tsize))
errx(1, "The executable %s does not belong to"
" process %d!\n"
- "Text segment size (in bytes): executable %d,"
+ "Text segment size (in bytes): executable %ld,"
" process %d", binfile, pid, exec.a_text,
ptoa(ki->kp_eproc.e_vm.vm_tsize));
data_offset = N_DATOFF(exec);
OpenPOWER on IntegriCloud