diff options
Diffstat (limited to 'winsup/cygwin/mmap.cc')
-rw-r--r-- | winsup/cygwin/mmap.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc index 08f89c84f4c..d4f953290b7 100644 --- a/winsup/cygwin/mmap.cc +++ b/winsup/cygwin/mmap.cc @@ -123,12 +123,12 @@ mmap_record::alloc_map (_off64_t off, DWORD len) len = PAGE_CNT (len) * getpagesize (); if (off > 0 && !VirtualProtect (base_address_, off, PAGE_NOACCESS, &old_prot)) - syscall_printf ("VirtualProtect(%x,%d) failed: %E", base_address_, off); + syscall_printf ("VirtualProtect(%x,%D) failed: %E", base_address_, off); if (off + len < size_to_map_ && !VirtualProtect (base_address_ + off + len, size_to_map_ - len - off, PAGE_NOACCESS, &old_prot)) - syscall_printf ("VirtualProtect(%x,%d) failed: %E", + syscall_printf ("VirtualProtect(%x,%D) failed: %E", base_address_ + off + len, size_to_map_ - len - off); off /= getpagesize (); len /= getpagesize (); @@ -158,7 +158,7 @@ mmap_record::map_map (_off64_t off, DWORD len) break; } - debug_printf ("map_map (fd=%d, off=%D, len=%d)", fdesc_, off, len); + debug_printf ("map_map (fd=%d, off=%D, len=%u)", fdesc_, off, len); len = PAGE_CNT (len); if ((off = find_empty (len)) == (DWORD)-1) @@ -333,7 +333,7 @@ list::match (caddr_t addr, DWORD len, caddr_t &m_addr, DWORD &m_len, for (int i = start + 1; i < nrecs; ++i) { low = (addr >= recs[i].get_address ()) ? addr : recs[i].get_address (); - high = recs[i].get_address () + high = recs[i].get_address () + (PAGE_CNT (recs[i].get_size ()) * getpagesize ()); high = (addr + len < high) ? addr + len : high; if (low < high) @@ -436,7 +436,7 @@ static map *mmapped_areas; extern "C" caddr_t mmap64 (caddr_t addr, size_t len, int prot, int flags, int fd, _off64_t off) { - syscall_printf ("addr %x, len %d, prot %x, flags %x, fd %d, off %D", + syscall_printf ("addr %x, len %u, prot %x, flags %x, fd %d, off %D", addr, len, prot, flags, fd, off); static DWORD granularity; @@ -566,7 +566,7 @@ mmap64 (caddr_t addr, size_t len, int prot, int flags, int fd, _off64_t off) The offset is re-added when evaluating the return value. */ if (base) base -= off - gran_off; - + HANDLE h = fh->mmap (&base, gran_len, access, flags, gran_off); if (h == INVALID_HANDLE_VALUE) @@ -619,7 +619,7 @@ mmap (caddr_t addr, size_t len, int prot, int flags, int fd, _off_t off) extern "C" int munmap (caddr_t addr, size_t len) { - syscall_printf ("munmap (addr %x, len %d)", addr, len); + syscall_printf ("munmap (addr %x, len %u)", addr, len); /* Error conditions according to SUSv3 */ if (!addr || ((DWORD)addr % getpagesize ()) || !len @@ -676,7 +676,7 @@ munmap (caddr_t addr, size_t len) extern "C" int msync (caddr_t addr, size_t len, int flags) { - syscall_printf ("addr = %x, len = %d, flags = %x", + syscall_printf ("addr = %x, len = %u, flags = %x", addr, len, flags); /* However, check flags for validity. */ @@ -844,7 +844,7 @@ fhandler_disk_file::mmap (caddr_t *addr, size_t len, DWORD access, if (!base && !(flags & MAP_FIXED)) base = MapViewOfFileEx (h, access, high, low, len, NULL); debug_printf ("%x = MapViewOfFileEx (h:%x, access:%x, 0, off:%D, " - "len:%d, addr:%x)", base, h, access, off, len, *addr); + "len:%u, addr:%x)", base, h, access, off, len, *addr); if (!base || ((flags & MAP_FIXED) && base != *addr)) { if (!base) @@ -908,7 +908,7 @@ mprotect (caddr_t addr, size_t len, int prot) DWORD old_prot; DWORD new_prot = 0; - syscall_printf ("mprotect (addr %x, len %d, prot %x)", addr, len, prot); + syscall_printf ("mprotect (addr %x, len %u, prot %x)", addr, len, prot); if (!wincap.virtual_protect_works_on_shared_pages () && addr >= (caddr_t)0x80000000 && addr <= (caddr_t)0xBFFFFFFF) @@ -986,7 +986,7 @@ fixup_mmaps_after_fork (HANDLE parent) { mmap_record *rec = map_list->recs + li; - debug_printf ("fd %d, h %x, access %x, offset %d, size %d, address %p", + debug_printf ("fd %d, h %x, access %x, offset %D, size %u, address %p", rec->get_fd (), rec->get_handle (), rec->get_access (), rec->get_offset (), rec->get_size (), rec->get_address ()); |