Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp	(revision 56909)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp	(revision 56910)
@@ -1258,5 +1258,13 @@
         }
         else
+        {
+            if (fRelative)
+            {
+                RTMsgError("The -relative parameter is invalid for raw images");
+                vrc = VERR_INVALID_PARAMETER;
+                goto out;
+            }
             vrc = VINF_SUCCESS;
+        }
     }
 #elif defined(RT_OS_LINUX)
@@ -1618,5 +1626,5 @@
                 if (fRelative)
                 {
-#if defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD)
+#if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_FREEBSD)
                     /* Refer to the correct partition and use offset 0. */
                     char *psz;
@@ -1624,5 +1632,5 @@
 #if defined(RT_OS_LINUX)
                                  "%s%u",
-#elif defined(RT_OS_FREEBSD)
+#elif defined(RT_OS_DARWIN) || defined(RT_OS_FREEBSD)
                                  "%ss%u",
 #endif
@@ -1634,18 +1642,4 @@
                         RTMsgError("Cannot create reference to individual partition %u, rc=%Rrc",
                                    partitions.aPartitions[i].uIndex, vrc);
-                        goto out;
-                    }
-                    pszRawName = psz;
-                    uStartOffset = 0;
-#elif defined(RT_OS_DARWIN)
-                    /* Refer to the correct partition and use offset 0. */
-                    char *psz;
-                    RTStrAPrintf(&psz, "%ss%u", rawdisk.c_str(),
-                                 partitions.aPartitions[i].uIndex);
-                    if (!psz)
-                    {
-                        vrc = VERR_NO_STR_MEMORY;
-                        RTMsgError("Cannot create reference to individual partition %u, rc=%Rrc",
-                                 partitions.aPartitions[i].uIndex, vrc);
                         goto out;
                     }
