Changeset 44173 in vbox for trunk/src/VBox/HostDrivers/Support/linux/SUPLib-linux.cpp
- Timestamp:
- Dec 19, 2012 6:12:31 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 82883
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/linux/SUPLib-linux.cpp
r39091 r44173 62 62 * Defined Constants And Macros * 63 63 *******************************************************************************/ 64 /** Unix Device name. */ 65 #define DEVICE_NAME "/dev/vboxdrv" 64 /** System device name. */ 65 #define DEVICE_NAME_SYS "/dev/vboxdrv" 66 /** User device name. */ 67 #define DEVICE_NAME_USR "/dev/vboxdrvu" 66 68 67 69 /* define MADV_DONTFORK if it's missing from the system headers. */ … … 72 74 73 75 74 int suplibOsInit(PSUPLIBDATA pThis, bool fPreInited )76 int suplibOsInit(PSUPLIBDATA pThis, bool fPreInited, bool fUnrestricted) 75 77 { 76 78 /* … … 93 95 * Try open the device. 94 96 */ 95 int hDevice = open( DEVICE_NAME, O_RDWR, 0);97 int hDevice = open(fUnrestricted ? DEVICE_NAME_SYS : DEVICE_NAME_USR, O_RDWR, 0); 96 98 if (hDevice < 0) 97 99 { … … 99 101 * Try load the device. 100 102 */ 101 hDevice = open( DEVICE_NAME, O_RDWR, 0);103 hDevice = open(fUnrestricted ? DEVICE_NAME_SYS : DEVICE_NAME_USR, O_RDWR, 0); 102 104 if (hDevice < 0) 103 105 { … … 133 135 * We're done. 134 136 */ 135 pThis->hDevice = hDevice; 137 pThis->hDevice = hDevice; 138 pThis->fUnrestricted = fUnrestricted; 136 139 return VINF_SUCCESS; 137 140 }
Note:
See TracChangeset
for help on using the changeset viewer.