- Timestamp:
- Dec 10, 2013 2:34:12 PM (11 years ago)
- Location:
- trunk/src/VBox/Installer/solaris
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/solaris/VBoxZoneAccess.c
r48954 r49867 31 31 *******************************************************************************/ 32 32 #define DEVICE_NAME "/devices/pseudo/vboxdrv@0:vboxdrv" 33 33 #define DEVICE_NAME_USR "/devices/pseudo/vboxdrv@0:vboxdrvu" 34 34 35 35 int main(int argc, char *argv[]) 36 36 { 37 37 int hDevice = -1; 38 int hDeviceUsr = -1; 38 39 39 40 /* Check root permissions. */ … … 57 58 } 58 59 60 /* Open the user device. */ 61 hDeviceUsr = open(DEVICE_NAME_USR, O_RDWR, 0); 62 if (hDeviceUsr < 0) 63 { 64 fprintf(stderr, "Failed to open '%s'. errno=%d\n", DEVICE_NAME_USR, errno); 65 close(hDevice); 66 return errno; 67 } 68 59 69 /* Mark the file handle close on exec. */ 60 if (fcntl(hDevice, F_SETFD, FD_CLOEXEC) != 0) 70 if ( fcntl(hDevice, F_SETFD, FD_CLOEXEC) != 0 71 || fcntl(hDeviceUsr, F_SETFD, FD_CLOEXEC) != 0) 61 72 { 62 73 fprintf(stderr, "Failed to set close on exec. errno=%d\n", errno); 63 74 close(hDevice); 75 close(hDeviceUsr); 64 76 return errno; 65 77 } … … 70 82 71 83 close(hDevice); 84 close(hDeviceUsr); 72 85 73 86 return 0; -
trunk/src/VBox/Installer/solaris/vboxconfig.sh
r48954 r49867 619 619 620 620 ## Add vboxdrv to devlink.tab (KEEP TABS!) 621 # clean up devlink.tab (KEEP TABS!)622 621 if test -f "$PKG_INSTALL_ROOT/etc/devlink.tab"; then 623 622 sed -e '/name=vboxdrv/d' -e '/name=vboxdrvu/d' "$PKG_INSTALL_ROOT/etc/devlink.tab" > "$PKG_INSTALL_ROOT/etc/devlink.vbox" 624 #echo "type=ddi_pseudo;name=vboxdrv;minor=vboxdrv \D" >> "$PKG_INSTALL_ROOT/etc/devlink.vbox"625 #echo "type=ddi_pseudo;name=vboxdrv;minor=vboxdrvu \M0" >> "$PKG_INSTALL_ROOT/etc/devlink.vbox"623 echo "type=ddi_pseudo;name=vboxdrv;minor=vboxdrv \D" >> "$PKG_INSTALL_ROOT/etc/devlink.vbox" 624 echo "type=ddi_pseudo;name=vboxdrv;minor=vboxdrvu \M0" >> "$PKG_INSTALL_ROOT/etc/devlink.vbox" 626 625 mv -f "$PKG_INSTALL_ROOT/etc/devlink.vbox" "$PKG_INSTALL_ROOT/etc/devlink.tab" 627 626 else … … 633 632 if test "$REMOTEINST" -eq 0; then 634 633 /usr/sbin/devfsadm -i "$MOD_VBOXDRV" 635 #if test $? -ne 0 || test ! -h "/dev/vboxdrv" || test ! -h "/dev/vboxdrvu" ; then636 #errorprint "Failed to create device link for $MOD_VBOXDRV."637 #exit 1638 #fi634 if test $? -ne 0 || test ! -h "/dev/vboxdrv" || test ! -h "/dev/vboxdrvu" ; then 635 errorprint "Failed to create device link for $MOD_VBOXDRV." 636 exit 1 637 fi 639 638 fi 640 639 … … 718 717 fatal=$1 719 718 720 # Remove vboxdrv from devlink.tab719 # Remove vboxdrv[u] from devlink.tab 721 720 if test -f "$PKG_INSTALL_ROOT/etc/devlink.tab"; then 722 721 devlinkfound=`cat "$PKG_INSTALL_ROOT/etc/devlink.tab" | grep vboxdrv` 723 722 if test -n "$devlinkfound"; then 724 sed -e '/name=vboxdrv/d' "$PKG_INSTALL_ROOT/etc/devlink.tab" > "$PKG_INSTALL_ROOT/etc/devlink.vbox"723 sed -e '/name=vboxdrv/d' -e '/name=vboxdrvu/d' "$PKG_INSTALL_ROOT/etc/devlink.tab" > "$PKG_INSTALL_ROOT/etc/devlink.vbox" 725 724 mv -f "$PKG_INSTALL_ROOT/etc/devlink.vbox" "$PKG_INSTALL_ROOT/etc/devlink.tab" 726 725 fi
Note:
See TracChangeset
for help on using the changeset viewer.