Changeset 49840 in vbox
- Timestamp:
- Dec 9, 2013 1:31:05 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 91184
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/solaris/SUPLib-solaris.cpp
r49636 r49840 53 53 #include <sys/fcntl.h> 54 54 #include <sys/ioctl.h> 55 #include <sys/zone.h> 55 56 56 57 #include <fcntl.h> … … 60 61 #include <stdlib.h> 61 62 #include <stdio.h> 63 #include <zone.h> 62 64 63 65 … … 65 67 * Defined Constants And Macros * 66 68 *******************************************************************************/ 67 /** @todo r=ramshankar: This breaks accessing the driver from non-global zones. We should check68 using getzoneid() != GLOBAL_ZONE and use /dev/vboxdrv[u] instead when we're in a zone. */69 69 /** Solaris device link - system. */ 70 #define DEVICE_NAME_SYS "/devices/pseudo/vboxdrv@0:vboxdrv"70 #define DEVICE_NAME_SYS "/devices/pseudo/vboxdrv@0:vboxdrv" 71 71 /** Solaris device link - user. */ 72 #define DEVICE_NAME_USR "/devices/pseudo/vboxdrv@0:vboxdrvu" 72 #define DEVICE_NAME_USR "/devices/pseudo/vboxdrv@0:vboxdrvu" 73 /** Solaris device link - system (non-global zone). */ 74 #define DEVICE_NAME_SYS_ZONE "/dev/vboxdrv" 75 /** Solaris device link - user (non-global zone). */ 76 #define DEVICE_NAME_USR_ZONE "/dev/vboxdrvu" 73 77 74 78 … … 106 110 * Try to open the device. 107 111 */ 108 const char *pszDeviceNm = fUnrestricted ? DEVICE_NAME_SYS : DEVICE_NAME_USR; 112 const char *pszDeviceNm; 113 if (getzoneid() == GLOBAL_ZONEID) 114 pszDeviceNm = fUnrestricted ? DEVICE_NAME_SYS : DEVICE_NAME_USR; 115 else 116 pszDeviceNm = fUnrestricted ? DEVICE_NAME_SYS_ZONE : DEVICE_NAME_USR_ZONE; 109 117 int hDevice = open(pszDeviceNm, O_RDWR, 0); 110 118 if (hDevice < 0)
Note:
See TracChangeset
for help on using the changeset viewer.