Author: neel
Date: Sat Sep 27 03:43:49 2014
New Revision: 272197
URL: http://svnweb.freebsd.org/changeset/base/272197

Log:
  After r271635 mmap(2) requires either MAP_PRIVATE or MAP_SHARED
  for non-anonymous mappings.
  
  This gets 'bhyvectl --get-all' working again.
  
  Reported by:  Anish Gupta ([email protected])

Modified:
  head/usr.sbin/bhyvectl/bhyvectl.c

Modified: head/usr.sbin/bhyvectl/bhyvectl.c
==============================================================================
--- head/usr.sbin/bhyvectl/bhyvectl.c   Sat Sep 27 02:15:45 2014        
(r272196)
+++ head/usr.sbin/bhyvectl/bhyvectl.c   Sat Sep 27 03:43:49 2014        
(r272197)
@@ -309,7 +309,7 @@ dump_vmcs_msr_bitmap(int vcpu, u_long ad
        if (fd < 0)
                goto done;
 
-       bitmap = mmap(NULL, PAGE_SIZE, PROT_READ, 0, fd, addr);
+       bitmap = mmap(NULL, PAGE_SIZE, PROT_READ, MAP_SHARED, fd, addr);
        if (bitmap == MAP_FAILED)
                goto done;
 
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to