Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Oct 2014 01:34:19 +0000 (UTC)
From:      Navdeep Parhar <np@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r273360 - head/tools/tools/cxgbetool
Message-ID:  <201410210134.s9L1YJnM030561@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: np
Date: Tue Oct 21 01:34:18 2014
New Revision: 273360
URL: https://svnweb.freebsd.org/changeset/base/273360

Log:
  cxgbetool: Catch up with r185979.  One of MAP_ANON, MAP_PRIVATE,
  MAP_SHARED, or MAP_STACK must be specified.
  
  This fixes the "loadfw" subcommand.
  
  MFC after:	1 week

Modified:
  head/tools/tools/cxgbetool/cxgbetool.c

Modified: head/tools/tools/cxgbetool/cxgbetool.c
==============================================================================
--- head/tools/tools/cxgbetool/cxgbetool.c	Tue Oct 21 01:31:24 2014	(r273359)
+++ head/tools/tools/cxgbetool/cxgbetool.c	Tue Oct 21 01:34:18 2014	(r273360)
@@ -1462,7 +1462,7 @@ loadfw(int argc, const char *argv[])
 	}
 
 	data.len = st.st_size;
-	data.data = mmap(0, data.len, PROT_READ, 0, fd, 0);
+	data.data = mmap(0, data.len, PROT_READ, MAP_PRIVATE, fd, 0);
 	if (data.data == MAP_FAILED) {
 		warn("mmap");
 		close(fd);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410210134.s9L1YJnM030561>