kern/71219: /proc/*/map dont tell file offset

KOIE Hidetaka koie at
Tue Aug 31 20:00:43 PDT 2004

>Number:         71219
>Category:       kern
>Synopsis:       /proc/*/map dont tell file offset
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 01 03:00:42 GMT 2004
>Originator:     KOIE Hidetaka
>Release:        6.0-CURRENT
SURI Giken
FreeBSD 6.0-CURRENT FreeBSD 6.0-CURRENT #1: Fri Aug 27 03:02:10 JST 2004     koie at  i386

      A checkpointing library wants to know a file offset in a mmaped segment. 
      like this:
---    Wed Sep  1 10:56:57 2004
+++ procfs_map.c        Wed Sep  1 11:50:32 2004
@@ -163,5 +163,5 @@ procfs_doprocmap(PFS_FILL_ARGS)
                snprintf(mebuffer, sizeof mebuffer,
-                   "0x%lx 0x%lx %d %d %p %s%s%s %d %d 0x%x %s %s %s %s\n",
+                   "0x%lx 0x%lx %d %d %p %s%s%s %d %d 0x%x %s %s %s %s %lld\n",
                        (u_long)entry->start, (u_long)entry->end,
                        resident, privateresident, obj,
@@ -172,5 +172,5 @@ procfs_doprocmap(PFS_FILL_ARGS)
                        (entry->eflags & MAP_ENTRY_COW)?"COW":"NCOW",
                        (entry->eflags & MAP_ENTRY_NEEDS_COPY)?"NC":"NNC",
-                       type, fullpath);
+                       type, fullpath, (long long)entry->offset);

                if (freepath != NULL)


More information about the freebsd-bugs mailing list