From d75f09543a64492e0f1e6148df41fc013ad198bc Mon Sep 17 00:00:00 2001 From: Beat Gaetzi Date: Fri, 14 Aug 2009 16:10:23 +0000 Subject: - Update to 3.0.51r22226 - Update Guest Additions to 3.0.4 - Add wiki page link to pkg-message - Add missing libxslt dependency [1] - Add NLS support [2] - Installing C and Python bindings [3] - Add patch to pass a physical disk to vbox [4] Submitted by: Guido Falsi [1], nork [2], Bernhard Froehlich [3], nox [4] Thanks to: All testers and patch submitters their patch already included upstream On behalf of: vbox@ (decke, dhn, miwi, nox) --- ...Box-Frontends-VBoxManage-VBoxInternalManage.cpp | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Frontends-VBoxManage-VBoxInternalManage.cpp (limited to 'emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Frontends-VBoxManage-VBoxInternalManage.cpp') diff --git a/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Frontends-VBoxManage-VBoxInternalManage.cpp b/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Frontends-VBoxManage-VBoxInternalManage.cpp new file mode 100644 index 000000000000..0a1f735fb79a --- /dev/null +++ b/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Frontends-VBoxManage-VBoxInternalManage.cpp @@ -0,0 +1,50 @@ +Index: src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp +@@ -54,7 +54,8 @@ + #ifdef RT_OS_WINDOWS + # include + # include +-#elif defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) ++#elif defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) \ ++ || defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD) + # include + # include + # include +@@ -76,6 +77,9 @@ + # include + # include + #endif /* RT_OS_SOLARIS */ ++#ifdef RT_OS_FREEBSD ++# include ++#endif /* RT_OS_FREEBSD */ + + using namespace com; + +@@ -1013,6 +1017,28 @@ + vrc = VERR_INVALID_PARAMETER; + goto out; + } ++#elif defined(RT_OS_FREEBSD) ++ struct stat DevStat; ++ if (!fstat(RawFile, &DevStat) && S_ISCHR(DevStat.st_mode)) ++ { ++ off_t cMediasize = 0; ++ if (!ioctl(RawFile, DIOCGMEDIASIZE, &cMediasize)) ++ { ++ cbSize = cMediasize; ++ } ++ else ++ { ++ vrc = RTErrConvertFromErrno(errno); ++ RTPrintf("Cannot get the block count for file '%s': %Rrc", rawdisk.raw(), vrc); ++ goto out; ++ } ++ } ++ else ++ { ++ RTPrintf("File '%s' is no character device\n", rawdisk.raw()); ++ vrc = VERR_INVALID_PARAMETER; ++ goto out; ++ } + #else /* all unrecognized OSes */ + /* Hopefully this works on all other hosts. If it doesn't, it'll just fail + * creating the VMDK, so no real harm done. */ -- cgit v1.2.3