Index: /trunk/src/VBox/Main/src-client/GuestCtrlPrivate.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/GuestCtrlPrivate.cpp	(revision 75912)
+++ /trunk/src/VBox/Main/src-client/GuestCtrlPrivate.cpp	(revision 75913)
@@ -39,4 +39,5 @@
 #include <iprt/rand.h>
 #include <iprt/time.h>
+#include <VBox/AssertGuest.h>
 
 
@@ -92,113 +93,139 @@
     LogFlowFunc(("\n"));
 
-    int rc = VINF_SUCCESS;
-
-    try
-    {
 #ifdef DEBUG
-        strmBlk.DumpToLog();
+    strmBlk.DumpToLog();
 #endif
         /* Object name. */
-        mName = strmBlk.GetString("name");
-        if (mName.isEmpty()) throw VERR_NOT_FOUND;
-        /* Type. */
-        Utf8Str strType(strmBlk.GetString("ftype"));
-        if (strType.equalsIgnoreCase("-"))
-            mType = FsObjType_File;
-        else if (strType.equalsIgnoreCase("d"))
-            mType = FsObjType_Directory;
-        /** @todo Add more types! */
-        else
-            mType = FsObjType_Unknown;
-        if (fLong)
-        {
-            /* Dates. */
-            mAccessTime       = GuestFsObjData::UnixEpochNsFromKey(strmBlk, "st_atime");
-            mBirthTime        = GuestFsObjData::UnixEpochNsFromKey(strmBlk, "st_birthtime");
-            mChangeTime       = GuestFsObjData::UnixEpochNsFromKey(strmBlk, "st_ctime");
-            mModificationTime = GuestFsObjData::UnixEpochNsFromKey(strmBlk, "st_mtime");
-        }
-        /* Object size. */
-        rc = strmBlk.GetInt64Ex("st_size", &mObjectSize);
-        if (RT_FAILURE(rc)) throw rc;
-        /** @todo Add complete ls info! */
-    }
-    catch (int rc2)
-    {
-        rc = rc2;
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-int GuestFsObjData::FromMkTemp(const GuestProcessStreamBlock &strmBlk)
-{
-    LogFlowFunc(("\n"));
-
-    int rc;
-
-    try
-    {
-#ifdef DEBUG
-        strmBlk.DumpToLog();
-#endif
-        /* Object name. */
-        mName = strmBlk.GetString("name");
-        if (mName.isEmpty()) throw VERR_NOT_FOUND;
-        /* Assign the stream block's rc. */
-        rc = strmBlk.GetRc();
-    }
-    catch (int rc2)
-    {
-        rc = rc2;
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-int GuestFsObjData::FromStat(const GuestProcessStreamBlock &strmBlk)
-{
-    LogFlowFunc(("\n"));
-
-    int rc = VINF_SUCCESS;
-
-    try
-    {
-#ifdef DEBUG
-        strmBlk.DumpToLog();
-#endif
-        /* Node ID, optional because we don't include this
-         * in older VBoxService (< 4.2) versions. */
-        mNodeID = strmBlk.GetInt64("node_id");
-        /* Object name. */
-        mName = strmBlk.GetString("name");
-        if (mName.isEmpty()) throw VERR_NOT_FOUND;
-        /* Type. */
-        Utf8Str strType(strmBlk.GetString("ftype"));
-        if (strType.equalsIgnoreCase("-"))
-            mType = FsObjType_File;
-        else if (strType.equalsIgnoreCase("d"))
-            mType = FsObjType_Directory;
-        else /** @todo Add more types! */
-            mType = FsObjType_Unknown;
-        /* Dates. */
+    mName = strmBlk.GetString("name");
+    ASSERT_GUEST_RETURN(mName.isNotEmpty(), VERR_NOT_FOUND);
+
+    /* Type. */
+    mType = FsObjType_Unknown;
+    const char *pszType = strmBlk.GetString("ftype");
+    if (pszType)
+        switch (*pszType)
+        {
+            case '-':   mType = FsObjType_File; break;
+            case 'd':   mType = FsObjType_Directory; break;
+            case 'l':   mType = FsObjType_Symlink; break;
+            case 'c':   mType = FsObjType_DevChar; break;
+            case 'b':   mType = FsObjType_DevBlock; break;
+            case 'f':   mType = FsObjType_Fifo; break;
+            case 's':   mType = FsObjType_Socket; break;
+            case 'w':   mType = FsObjType_WhiteOut; break;
+            default: AssertMsgFailed(("%s\n", pszType));
+        }
+
+    /* Dates. */
+    if (fLong)
+    {
         mAccessTime       = GuestFsObjData::UnixEpochNsFromKey(strmBlk, "st_atime");
         mBirthTime        = GuestFsObjData::UnixEpochNsFromKey(strmBlk, "st_birthtime");
         mChangeTime       = GuestFsObjData::UnixEpochNsFromKey(strmBlk, "st_ctime");
         mModificationTime = GuestFsObjData::UnixEpochNsFromKey(strmBlk, "st_mtime");
-        /* Object size. */
-        rc = strmBlk.GetInt64Ex("st_size", &mObjectSize);
-        if (RT_FAILURE(rc)) throw rc;
-        /** @todo Add complete stat info! */
-    }
-    catch (int rc2)
-    {
-        rc = rc2;
-    }
+    }
+
+    /* Object size. */
+    int rc = strmBlk.GetInt64Ex("st_size", &mObjectSize);
+    ASSERT_GUEST_RC_RETURN(rc, rc);
+
+    /* Owner. */
+    mUID = strmBlk.GetUInt32("uid");
+    mGID = strmBlk.GetUInt32("gid");
+
+    /** @todo Add complete stat info!
+     * int64_t              mAllocatedSize;
+     * uint32_t             mDeviceNumber;
+     * Utf8Str              mFileAttrs;
+     * uint32_t             mGenerationID;
+     * Utf8Str              mGroupName;
+     * uint32_t             mNumHardLinks;
+     * uint32_t             mNodeIDDevice;
+     * uint32_t             mUserFlags;
+     * Utf8Str              mUserName;
+     * Utf8Str              mACL;
+     */
+
+    LogFlowFuncLeave();
+    return VINF_SUCCESS;
+}
+
+int GuestFsObjData::FromMkTemp(const GuestProcessStreamBlock &strmBlk)
+{
+    LogFlowFunc(("\n"));
+
+#ifdef DEBUG
+    strmBlk.DumpToLog();
+#endif
+    /* Object name. */
+    mName = strmBlk.GetString("name");
+    ASSERT_GUEST_RETURN(mName.isNotEmpty(), VERR_NOT_FOUND);
+
+    /* Assign the stream block's rc. */
+    int rc = strmBlk.GetRc();
 
     LogFlowFuncLeaveRC(rc);
     return rc;
+}
+
+int GuestFsObjData::FromStat(const GuestProcessStreamBlock &strmBlk)
+{
+    LogFlowFunc(("\n"));
+
+#ifdef DEBUG
+    strmBlk.DumpToLog();
+#endif
+    /* Node ID, optional because we don't include this in older VBoxService (< 4.2) versions. */
+    mNodeID = strmBlk.GetInt64("node_id");
+
+    /* Object name. */
+    mName = strmBlk.GetString("name");
+    ASSERT_GUEST_RETURN(mName.isNotEmpty(), VERR_NOT_FOUND);
+
+    /* Type. */
+    const char *pszType = strmBlk.GetString("ftype");
+    if (pszType)
+        switch (*pszType)
+        {
+            case '-':   mType = FsObjType_File; break;
+            case 'd':   mType = FsObjType_Directory; break;
+            case 'l':   mType = FsObjType_Symlink; break;
+            case 'c':   mType = FsObjType_DevChar; break;
+            case 'b':   mType = FsObjType_DevBlock; break;
+            case 'f':   mType = FsObjType_Fifo; break;
+            case 's':   mType = FsObjType_Socket; break;
+            case 'w':   mType = FsObjType_WhiteOut; break;
+            default: AssertMsgFailed(("%s\n", pszType));
+        }
+
+    /* Dates. */
+    mAccessTime       = GuestFsObjData::UnixEpochNsFromKey(strmBlk, "st_atime");
+    mBirthTime        = GuestFsObjData::UnixEpochNsFromKey(strmBlk, "st_birthtime");
+    mChangeTime       = GuestFsObjData::UnixEpochNsFromKey(strmBlk, "st_ctime");
+    mModificationTime = GuestFsObjData::UnixEpochNsFromKey(strmBlk, "st_mtime");
+
+    /* Object size. */
+    int rc = strmBlk.GetInt64Ex("st_size", &mObjectSize);
+    ASSERT_GUEST_RC_RETURN(rc, rc);
+
+    /* Owner. */
+    mUID = strmBlk.GetUInt32("uid");
+    mGID = strmBlk.GetUInt32("gid");
+
+    /** @todo Add complete stat info!
+     * int64_t              mAllocatedSize;
+     * uint32_t             mDeviceNumber;
+     * Utf8Str              mFileAttrs;
+     * uint32_t             mGenerationID;
+     * Utf8Str              mGroupName;
+     * uint32_t             mNumHardLinks;
+     * uint32_t             mNodeIDDevice;
+     * uint32_t             mUserFlags;
+     * Utf8Str              mUserName;
+     * Utf8Str              mACL;
+     */
+
+    LogFlowFuncLeave();
+    return VINF_SUCCESS;
 }
 
