procfs_map.c (21673) | procfs_map.c (21754) |
---|---|
1/* 2 * Copyright (c) 1993 Jan-Simon Pendry 3 * Copyright (c) 1993 4 * The Regents of the University of California. All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * Jan-Simon Pendry. 8 * --- 22 unchanged lines hidden (view full) --- 31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35 * SUCH DAMAGE. 36 * 37 * @(#)procfs_status.c 8.3 (Berkeley) 2/17/94 38 * | 1/* 2 * Copyright (c) 1993 Jan-Simon Pendry 3 * Copyright (c) 1993 4 * The Regents of the University of California. All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * Jan-Simon Pendry. 8 * --- 22 unchanged lines hidden (view full) --- 31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35 * SUCH DAMAGE. 36 * 37 * @(#)procfs_status.c 8.3 (Berkeley) 2/17/94 38 * |
39 * $FreeBSD: head/sys/fs/procfs/procfs_map.c 21673 1997-01-14 07:20:47Z jkh $ | 39 * $FreeBSD: head/sys/fs/procfs/procfs_map.c 21754 1997-01-16 04:16:22Z dyson $ |
40 */ 41 42#include <sys/param.h> 43#include <sys/systm.h> 44#include <sys/time.h> 45#include <sys/kernel.h> 46#include <sys/proc.h> 47#include <sys/vnode.h> --- 60 unchanged lines hidden (view full) --- 108 for (entry = map->header.next; 109 ((uio->uio_resid > 0) && (entry != &map->header)); 110 entry = entry->next) { 111 vm_object_t obj, tobj, lobj; 112 vm_offset_t addr; 113 int resident, privateresident; 114 char *type; 115 | 40 */ 41 42#include <sys/param.h> 43#include <sys/systm.h> 44#include <sys/time.h> 45#include <sys/kernel.h> 46#include <sys/proc.h> 47#include <sys/vnode.h> --- 60 unchanged lines hidden (view full) --- 108 for (entry = map->header.next; 109 ((uio->uio_resid > 0) && (entry != &map->header)); 110 entry = entry->next) { 111 vm_object_t obj, tobj, lobj; 112 vm_offset_t addr; 113 int resident, privateresident; 114 char *type; 115 |
116 if (entry->is_a_map || entry->is_sub_map) | 116 if (entry->eflags & (MAP_ENTRY_IS_A_MAP|MAP_ENTRY_IS_SUB_MAP)) |
117 continue; 118 119 obj = entry->object.vm_object; 120 if (obj && (obj->ref_count == 1)) 121 privateresident = obj->resident_page_count; 122 else 123 privateresident = 0; 124 --- 33 unchanged lines hidden (view full) --- 158 * start, end, resident, private resident, cow, access, type. 159 */ 160 sprintf(mebuffer, "0x%-8.8x 0x%-8.8x %9d %9d %s%s%s %s %s\n", 161 entry->start, entry->end, 162 resident, privateresident, 163 (entry->protection & VM_PROT_READ)?"r":"-", 164 (entry->protection & VM_PROT_WRITE)?"w":"-", 165 (entry->protection & VM_PROT_EXECUTE)?"x":"-", | 117 continue; 118 119 obj = entry->object.vm_object; 120 if (obj && (obj->ref_count == 1)) 121 privateresident = obj->resident_page_count; 122 else 123 privateresident = 0; 124 --- 33 unchanged lines hidden (view full) --- 158 * start, end, resident, private resident, cow, access, type. 159 */ 160 sprintf(mebuffer, "0x%-8.8x 0x%-8.8x %9d %9d %s%s%s %s %s\n", 161 entry->start, entry->end, 162 resident, privateresident, 163 (entry->protection & VM_PROT_READ)?"r":"-", 164 (entry->protection & VM_PROT_WRITE)?"w":"-", 165 (entry->protection & VM_PROT_EXECUTE)?"x":"-", |
166 entry->copy_on_write?"COW":" ", | 166 (entry->eflags & MAP_ENTRY_COW)?"COW":" ", |
167 type); 168 169 len = strlen(mebuffer); 170 if (len > uio->uio_resid) { 171 error = EFBIG; 172 break; 173 } 174 error = uiomove(mebuffer, len, uio); --- 14 unchanged lines hidden --- | 167 type); 168 169 len = strlen(mebuffer); 170 if (len > uio->uio_resid) { 171 error = EFBIG; 172 break; 173 } 174 error = uiomove(mebuffer, len, uio); --- 14 unchanged lines hidden --- |