Deleted Added
full compact
fstat.c (69896) fstat.c (72527)
1/*-
2 * Copyright (c) 1988, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 28 unchanged lines hidden (view full) ---

37 The Regents of the University of California. All rights reserved.\n";
38#endif /* not lint */
39
40#ifndef lint
41#if 0
42static char sccsid[] = "@(#)fstat.c 8.3 (Berkeley) 5/2/95";
43#endif
44static const char rcsid[] =
1/*-
2 * Copyright (c) 1988, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 28 unchanged lines hidden (view full) ---

37 The Regents of the University of California. All rights reserved.\n";
38#endif /* not lint */
39
40#ifndef lint
41#if 0
42static char sccsid[] = "@(#)fstat.c 8.3 (Berkeley) 5/2/95";
43#endif
44static const char rcsid[] =
45 "$FreeBSD: head/usr.bin/fstat/fstat.c 69896 2000-12-12 07:25:57Z mckusick $";
45 "$FreeBSD: head/usr.bin/fstat/fstat.c 72527 2001-02-15 22:42:44Z iedowse $";
46#endif /* not lint */
47
48#include <sys/param.h>
49#include <sys/time.h>
50#include <sys/proc.h>
51#include <sys/user.h>
52#include <sys/stat.h>
53#include <sys/vnode.h>

--- 334 unchanged lines hidden (view full) ---

388 if (!KVM_READ(kp->ki_vmspace, &vmspace, sizeof(vmspace))) {
389 dprintf(stderr,
390 "can't read vmspace at %p for pid %d\n",
391 (void *)kp->ki_vmspace, Pid);
392 return;
393 }
394 map = &vmspace.vm_map;
395
46#endif /* not lint */
47
48#include <sys/param.h>
49#include <sys/time.h>
50#include <sys/proc.h>
51#include <sys/user.h>
52#include <sys/stat.h>
53#include <sys/vnode.h>

--- 334 unchanged lines hidden (view full) ---

388 if (!KVM_READ(kp->ki_vmspace, &vmspace, sizeof(vmspace))) {
389 dprintf(stderr,
390 "can't read vmspace at %p for pid %d\n",
391 (void *)kp->ki_vmspace, Pid);
392 return;
393 }
394 map = &vmspace.vm_map;
395
396 for (entryp = map->header.next; entryp != &vmspace.vm_map.header;
397 entryp = entry.next) {
396 for (entryp = map->header.next;
397 entryp != &kp->ki_vmspace->vm_map.header; entryp = entry.next) {
398 if (!KVM_READ(entryp, &entry, sizeof(entry))) {
399 dprintf(stderr,
400 "can't read vm_map_entry at %p for pid %d\n",
401 (void *)entryp, Pid);
402 return;
403 }
404
405 if (entry.eflags & MAP_ENTRY_IS_SUB_MAP)

--- 465 unchanged lines hidden ---
398 if (!KVM_READ(entryp, &entry, sizeof(entry))) {
399 dprintf(stderr,
400 "can't read vm_map_entry at %p for pid %d\n",
401 (void *)entryp, Pid);
402 return;
403 }
404
405 if (entry.eflags & MAP_ENTRY_IS_SUB_MAP)

--- 465 unchanged lines hidden ---