diff options
| author | vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f> | 2007-09-20 12:07:28 +0000 |
|---|---|---|
| committer | vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f> | 2007-09-20 12:07:28 +0000 |
| commit | 3bfc40b2994824e6ac0bbfaa42324dd52e5a66ba (patch) | |
| tree | 4e3fc536cac60f80f4cf1c4e68d94d895f7285ee /src/VBox/HostDrivers/Support/linux/SUPLib-linux.cpp | |
| parent | 322039cf3fc3bcbadbfc0bac28cd4c383e743d49 (diff) | |
| download | VirtualBox-svn-3bfc40b2994824e6ac0bbfaa42324dd52e5a66ba.tar.gz | |
Added a LogRel with additional driver open info. Return the VERR_VM_DRIVER_* stuff on Solaris, Darwin, FreeBSD and OS/2 as well.
git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@4925 cfe28804-0f27-0410-a406-dd0f0b0b656f
Diffstat (limited to 'src/VBox/HostDrivers/Support/linux/SUPLib-linux.cpp')
| -rw-r--r-- | src/VBox/HostDrivers/Support/linux/SUPLib-linux.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/VBox/HostDrivers/Support/linux/SUPLib-linux.cpp b/src/VBox/HostDrivers/Support/linux/SUPLib-linux.cpp index c0138fdc494..85c6c291899 100644 --- a/src/VBox/HostDrivers/Support/linux/SUPLib-linux.cpp +++ b/src/VBox/HostDrivers/Support/linux/SUPLib-linux.cpp @@ -99,16 +99,18 @@ int suplibOsInit(size_t cbReserve) g_hDevice = open(DEVICE_NAME, O_RDWR, 0); if (g_hDevice < 0) { + int rc; switch (errno) { case ENXIO: /* see man 2 open, ENODEV is actually a kernel bug */ - case ENODEV: return VERR_VM_DRIVER_LOAD_ERROR; + case ENODEV: rc = VERR_VM_DRIVER_LOAD_ERROR; break; case EPERM: - case EACCES: return VERR_VM_DRIVER_NOT_ACCESSIBLE; - case ENOENT: return VERR_VM_DRIVER_NOT_INSTALLED; - default: - return VERR_VM_DRIVER_OPEN_ERROR; + case EACCES: rc = VERR_VM_DRIVER_NOT_ACCESSIBLE; break; + case ENOENT: rc = VERR_VM_DRIVER_NOT_INSTALLED; break; + default: rc = VERR_VM_DRIVER_OPEN_ERROR; break; } + LogRel(("Failed to open \"%s\", errno=%d, rc=%Vrc\n", DEVICE_NAME, errno, rc)); + return rc; } } |
