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
This commit is contained in:
np 2014-10-21 01:34:18 +00:00
parent e90d135155
commit 1766d253c2

View File

@ -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);