Changeset 37839 in vbox
- Timestamp:
- Jul 8, 2011 11:38:20 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/solaris/SharedFolders/vboxfs_vnode.c
r37823 r37839 1694 1694 * invoke down the line VOP_ADDMAP()->sffs_addmap() 1695 1695 */ 1696 int error ;1696 int error = 0; 1697 1697 sfnode_t *node = VN2SFN(dvp); 1698 1698 ASSERT(node); … … 1715 1715 as_rangelock(asp); 1716 1716 1717 #if defined(VBOX_VFS_SOLARIS_10U6) 1718 if ((flags & MAP_FIXED) == 0) 1719 { 1720 map_addr(addrp, len, off, 1, flags); 1721 if (*addrp == NULL) 1722 error = ENOMEM; 1723 } 1724 else 1725 as_unmap(asp, *addrp, len); /* User specified address, remove any previous mappings */ 1726 #else 1717 1727 error = choose_addr(asp, addrp, len, off, ADDR_VACALIGN, flags); 1718 if (!error) 1728 #endif 1729 1730 if (error) 1719 1731 { 1720 segvn_crargs_t vnodeargs; 1721 memset(&vnodeargs, 0, sizeof(vnodeargs)); 1722 vnodeargs.vp = dvp; 1723 vnodeargs.cred = credp; 1724 vnodeargs.offset = off; 1725 vnodeargs.type = flags & MAP_TYPE; 1726 vnodeargs.prot = prot; 1727 vnodeargs.maxprot = maxprot; 1728 vnodeargs.flags = flags & ~MAP_TYPE; 1729 vnodeargs.amp = NULL; /* anon. mapping */ 1730 vnodeargs.szc = 0; /* preferred page size code */ 1731 vnodeargs.lgrp_mem_policy_flags = 0; 1732 1733 error = as_map(asp, *addrp, len, segvn_create, &vnodeargs); 1734 } 1732 as_rangeunlock(asp); 1733 mutex_exit(&sffs_lock); 1734 return (error); 1735 } 1736 1737 segvn_crargs_t vnodeargs; 1738 memset(&vnodeargs, 0, sizeof(vnodeargs)); 1739 vnodeargs.vp = dvp; 1740 vnodeargs.cred = credp; 1741 vnodeargs.offset = off; 1742 vnodeargs.type = flags & MAP_TYPE; 1743 vnodeargs.prot = prot; 1744 vnodeargs.maxprot = maxprot; 1745 vnodeargs.flags = flags & ~MAP_TYPE; 1746 vnodeargs.amp = NULL; /* anon. mapping */ 1747 vnodeargs.szc = 0; /* preferred page size code */ 1748 vnodeargs.lgrp_mem_policy_flags = 0; 1749 1750 error = as_map(asp, *addrp, len, segvn_create, &vnodeargs); 1735 1751 1736 1752 as_rangeunlock(asp); 1737 1753 mutex_exit(&sffs_lock); 1738 1739 1754 return (error); 1740 1755 }
Note:
See TracChangeset
for help on using the changeset viewer.