VirtualBox

Changeset 34855 in vbox for trunk/src


Ignore:
Timestamp:
Dec 9, 2010 9:08:01 AM (14 years ago)
Author:
vboxsync
Message:

HostServices/SharedFolders: Release (less noisy) + debug logging adjustments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedFolders/service.cpp

    r33892 r34855  
    8888    NOREF(pvClient);
    8989
    90     LogRel(("SharedFolders host service: connected, u32ClientID = %d\n", u32ClientID));
     90    Log(("SharedFolders host service: connected, u32ClientID = %u\n", u32ClientID));
    9191
    9292    return rc;
     
    9898    SHFLCLIENTDATA *pClient = (SHFLCLIENTDATA *)pvClient;
    9999
    100     LogRel(("SharedFolders host service: disconnected, u32ClientID = %d\n", u32ClientID));
     100    Log(("SharedFolders host service: disconnected, u32ClientID = %u\n", u32ClientID));
    101101
    102102    vbsfDisconnect(pClient);
     
    114114    SHFLCLIENTDATA *pClient = (SHFLCLIENTDATA *)pvClient;
    115115
    116     LogRel(("SharedFolders host service: saving state, u32ClientID = %d\n", u32ClientID));
     116    Log(("SharedFolders host service: saving state, u32ClientID = %u\n", u32ClientID));
    117117
    118118    int rc = SSMR3PutU32(pSSM, SHFL_SSM_VERSION);
     
    176176    uint32_t        len, version;
    177177
    178     LogRel(("SharedFolders host service: loading state, u32ClientID = %d\n", u32ClientID));
     178    Log(("SharedFolders host service: loading state, u32ClientID = %u\n", u32ClientID));
    179179
    180180    int rc = SSMR3GetU32(pSSM, &version);
     
    259259        }
    260260    }
    261     LogRel(("SharedFolders host service: success\n"));
     261    Log(("SharedFolders host service: successfully loaded state\n"));
    262262    return VINF_SUCCESS;
    263263}
     
    267267    int rc = VINF_SUCCESS;
    268268
    269     Log(("svcCall: u32ClientID = %d, fn = %d, cParms = %d, pparms = %d\n", u32ClientID, u32Function, cParms, paParms));
     269    Log(("SharedFolders host service: svcCall: u32ClientID = %u, fn = %u, cParms = %u, pparms = %p\n", u32ClientID, u32Function, cParms, paParms));
    270270
    271271    SHFLCLIENTDATA *pClient = (SHFLCLIENTDATA *)pvClient;
     
    279279    {
    280280        /** @todo parameters other than 32 bit */
    281         Log(("    pparms[%d]: type %d value %d\n", i, paParms[i].type, paParms[i].u.uint32));
     281        Log(("    pparms[%d]: type %u, value %u\n", i, paParms[i].type, paParms[i].u.uint32));
    282282    }
    283283#endif
     
    287287        case SHFL_FN_QUERY_MAPPINGS:
    288288        {
    289             Log(("svcCall: SHFL_FN_QUERY_MAPPINGS\n"));
     289            Log(("SharedFolders host service: svcCall: SHFL_FN_QUERY_MAPPINGS\n"));
    290290
    291291            /* Verify parameter count and types. */
     
    343343        case SHFL_FN_QUERY_MAP_NAME:
    344344        {
    345             Log(("svcCall: SHFL_FN_QUERY_MAP_NAME\n"));
     345            Log(("SharedFolders host service: svcCall: SHFL_FN_QUERY_MAP_NAME\n"));
    346346
    347347            /* Verify parameter count and types. */
     
    384384        case SHFL_FN_CREATE:
    385385        {
    386             Log(("svcCall: SHFL_FN_CREATE\n"));
     386            Log(("SharedFolders host service: svcCall: SHFL_FN_CREATE\n"));
    387387
    388388            /* Verify parameter count and types. */
     
    396396                    )
    397397            {
    398                 Log(("Invalid parameters types\n"));
     398                Log(("SharedFolders host service: Invalid parameters types\n"));
    399399                rc = VERR_INVALID_PARAMETER;
    400400            }
     
    435435        case SHFL_FN_CLOSE:
    436436        {
    437             Log(("svcCall: SHFL_FN_CLOSE\n"));
     437            Log(("SharedFolders host service: svcCall: SHFL_FN_CLOSE\n"));
    438438
    439439            /* Verify parameter count and types. */
     
    462462                if (Handle == SHFL_HANDLE_NIL)
    463463                {
    464                     AssertMsgFailed(("Invalid handle!!!!\n"));
     464                    AssertMsgFailed(("Invalid handle!\n"));
    465465                    rc = VERR_INVALID_HANDLE;
    466466                }
     
    484484        /** Read object content. */
    485485        case SHFL_FN_READ:
    486             Log(("svcCall: SHFL_FN_READ\n"));
     486            Log(("SharedFolders host service: svcCall: SHFL_FN_READ\n"));
    487487
    488488            /* Verify parameter count and types. */
     
    520520                if (Handle == SHFL_HANDLE_NIL)
    521521                {
    522                     AssertMsgFailed(("Invalid handle!!!!\n"));
     522                    AssertMsgFailed(("Invalid handle!\n"));
    523523                    rc = VERR_INVALID_HANDLE;
    524524                }
     
    551551        /** Write new object content. */
    552552        case SHFL_FN_WRITE:
    553             Log(("svcCall: SHFL_FN_WRITE\n"));
     553            Log(("SharedFolders host service: svcCall: SHFL_FN_WRITE\n"));
    554554
    555555            /* Verify parameter count and types. */
     
    587587                if (Handle == SHFL_HANDLE_NIL)
    588588                {
    589                     AssertMsgFailed(("Invalid handle!!!!\n"));
     589                    AssertMsgFailed(("Invalid handle!\n"));
    590590                    rc = VERR_INVALID_HANDLE;
    591591                }
     
    618618        /** Lock/unlock a range in the object. */
    619619        case SHFL_FN_LOCK:
    620             Log(("svcCall: SHFL_FN_LOCK\n"));
     620            Log(("SharedFolders host service: svcCall: SHFL_FN_LOCK\n"));
    621621
    622622            /* Verify parameter count and types. */
     
    652652                if (Handle == SHFL_HANDLE_NIL)
    653653                {
    654                     AssertMsgFailed(("Invalid handle!!!!\n"));
     654                    AssertMsgFailed(("Invalid handle!\n"));
    655655                    rc = VERR_INVALID_HANDLE;
    656656                }
     
    705705        case SHFL_FN_LIST:
    706706        {
    707             Log(("svcCall: SHFL_FN_LIST\n"));
     707            Log(("SharedFolders host service: svcCall: SHFL_FN_LIST\n"));
    708708
    709709            /* Verify parameter count and types. */
     
    783783        case SHFL_FN_READLINK:
    784784        {
    785             Log(("svcCall: SHFL_FN_READLINK\n"));
     785            Log(("SharedFolders host service: svcCall: SHFL_FN_READLINK\n"));
    786786
    787787            /* Verify parameter count and types. */
     
    831831        case SHFL_FN_MAP_FOLDER_OLD:
    832832        {
    833             Log(("svcCall: SHFL_FN_MAP_FOLDER_OLD\n"));
     833            Log(("SharedFolders host service: svcCall: SHFL_FN_MAP_FOLDER_OLD\n"));
    834834
    835835            /* Verify parameter count and types. */
     
    874874        case SHFL_FN_MAP_FOLDER:
    875875        {
    876             Log(("svcCall: SHFL_FN_MAP_FOLDER\n"));
     876            Log(("SharedFolders host service: svcCall: SHFL_FN_MAP_FOLDER\n"));
    877877            if (BIT_FLAG(pClient->fu32Flags, SHFL_CF_UTF8))
    878                 LogRel(("SharedFolders host service: request to map folder '%S'\n",
    879                         ((PSHFLSTRING)paParms[0].u.pointer.addr)->String.utf8));
    880             else
    881                 LogRel(("SharedFolders host service: request to map folder '%lS'\n",
    882                         ((PSHFLSTRING)paParms[0].u.pointer.addr)->String.ucs2));
     878                Log(("SharedFolders host service: request to map folder '%S'\n",
     879                     ((PSHFLSTRING)paParms[0].u.pointer.addr)->String.utf8));
     880            else
     881                Log(("SharedFolders host service: request to map folder '%lS'\n",
     882                     ((PSHFLSTRING)paParms[0].u.pointer.addr)->String.ucs2));
    883883
    884884            /* Verify parameter count and types. */
     
    921921                }
    922922            }
    923             LogRel(("SharedFolders host service: map operation result %Rrc.\n", rc));
     923            Log(("SharedFolders host service: map operation result %Rrc\n", rc));
    924924            if (RT_SUCCESS(rc))
    925                 LogRel(("    Mapped to handle %d.\n", paParms[1].u.uint32));
     925                Log(("SharedFolders host service: mapped to handle %d\n", paParms[1].u.uint32));
    926926            break;
    927927        }
     
    929929        case SHFL_FN_UNMAP_FOLDER:
    930930        {
    931             Log(("svcCall: SHFL_FN_UNMAP_FOLDER\n"));
    932             LogRel(("SharedFolders host service: request to unmap folder handle %d\n",
    933                     paParms[0].u.uint32));
     931            Log(("SharedFolders host service: svcCall: SHFL_FN_UNMAP_FOLDER\n"));
     932            Log(("SharedFolders host service: request to unmap folder handle %u\n",
     933                 paParms[0].u.uint32));
    934934
    935935            /* Verify parameter count and types. */
     
    957957                }
    958958            }
    959             LogRel(("SharedFolders host service: unmap operation result %Rrc.\n", rc));
     959            Log(("SharedFolders host service: unmap operation result %Rrc\n", rc));
    960960            break;
    961961        }
     
    964964        case SHFL_FN_INFORMATION:
    965965        {
    966             Log(("svcCall: SHFL_FN_INFORMATION\n"));
     966            Log(("SharedFolders host service: svcCall: SHFL_FN_INFORMATION\n"));
    967967
    968968            /* Verify parameter count and types. */
     
    10201020        case SHFL_FN_REMOVE:
    10211021        {
    1022             Log(("svcCall: SHFL_FN_REMOVE\n"));
     1022            Log(("SharedFolders host service: svcCall: SHFL_FN_REMOVE\n"));
    10231023
    10241024            /* Verify parameter count and types. */
     
    10631063        case SHFL_FN_RENAME:
    10641064        {
    1065             Log(("svcCall: SHFL_FN_RENAME\n"));
     1065            Log(("SharedFolders host service: svcCall: SHFL_FN_RENAME\n"));
    10661066
    10671067            /* Verify parameter count and types. */
     
    11091109        case SHFL_FN_FLUSH:
    11101110        {
    1111             Log(("svcCall: SHFL_FN_FLUSH\n"));
     1111            Log(("SharedFolders host service: svcCall: SHFL_FN_FLUSH\n"));
    11121112
    11131113            /* Verify parameter count and types. */
     
    11371137                if (Handle == SHFL_HANDLE_NIL)
    11381138                {
    1139                     AssertMsgFailed(("Invalid handle!!!!\n"));
     1139                    AssertMsgFailed(("Invalid handle!\n"));
    11401140                    rc = VERR_INVALID_HANDLE;
    11411141                }
     
    11631163        case SHFL_FN_SYMLINK:
    11641164        {
    1165             Log(("svnCall: SHFL_FN_SYMLINK\n"));
     1165            Log(("SharedFolders host service: svnCall: SHFL_FN_SYMLINK\n"));
    11661166            /* Verify parameter count and types. */
    11671167            if (cParms != SHFL_CPARMS_SYMLINK)
     
    12231223    }
    12241224
    1225     LogFlow(("svcCall: rc = %Rrc\n", rc));
     1225    LogFlow(("SharedFolders host service: svcCall: rc=%Rrc\n", rc));
    12261226
    12271227    if (   !fAsynchronousProcessing
     
    12601260    case SHFL_FN_ADD_MAPPING:
    12611261    {
    1262         Log(("svcCall: SHFL_FN_ADD_MAPPING\n"));
    1263         LogRel(("SharedFolders host service: adding host mapping.\n"));
     1262        Log(("SharedFolders host service: svcCall: SHFL_FN_ADD_MAPPING\n"));
     1263        LogRel(("SharedFolders host service: adding host mapping\n"));
    12641264        LogRel(("    Host path '%lS', map name '%lS', %s\n",
    12651265                ((SHFLSTRING *)paParms[0].u.pointer.addr)->String.ucs2,
     
    13131313            }
    13141314        }
    1315         LogRel(("SharedFolders host service: add mapping result %Rrc\n", rc));
     1315        if (RT_FAILURE(rc))
     1316            LogRel(("SharedFolders host service: adding host mapping failed with rc=%Rrc\n", rc));
    13161317        break;
    13171318    }
     
    13191320    case SHFL_FN_REMOVE_MAPPING:
    13201321    {
    1321         Log(("svcCall: SHFL_FN_REMOVE_MAPPING\n"));
     1322        Log(("SharedFolders host service: svcCall: SHFL_FN_REMOVE_MAPPING\n"));
    13221323        LogRel(("SharedFolders host service: removing host mapping '%lS'\n",
    13231324                ((SHFLSTRING *)paParms[0].u.pointer.addr)->String.ucs2));
     
    13551356            }
    13561357        }
    1357         LogRel(("SharedFolders host service: remove mapping result %Rrc\n", rc));
     1358        if (RT_FAILURE(rc))
     1359            LogRel(("SharedFolders host service: removing host mapping failed with rc=%Rrc\n", rc));
    13581360        break;
    13591361    }
     
    13611363    case SHFL_FN_SET_STATUS_LED:
    13621364    {
    1363         Log(("svcCall: SHFL_FN_SET_STATUS_LED\n"));
     1365        Log(("SharedFolders host service: svcCall: SHFL_FN_SET_STATUS_LED\n"));
    13641366
    13651367        /* Verify parameter count and types. */
     
    14001402    }
    14011403
    1402     LogFlow(("svcHostCall: rc = %Rrc\n", rc));
     1404    LogFlow(("SharedFolders host service: svcHostCall ended with rc=%Rrc\n", rc));
    14031405    return rc;
    14041406}
     
    14081410    int rc = VINF_SUCCESS;
    14091411
    1410     Log(("VBoxHGCMSvcLoad: ptable = %p\n", ptable));
     1412    Log(("SharedFolders host service: VBoxHGCMSvcLoad: ptable = %p\n", ptable));
    14111413
    14121414    if (!VALID_PTR(ptable))
    14131415    {
    1414         LogRelFunc(("Bad value of ptable (%p) in shared folders service\n", ptable));
     1416        LogRelFunc(("SharedFolders host service: bad value of ptable (%p)\n", ptable));
    14151417        rc = VERR_INVALID_PARAMETER;
    14161418    }
    14171419    else
    14181420    {
    1419         Log(("VBoxHGCMSvcLoad: ptable->cbSize = %d, ptable->u32Version = 0x%08X\n", ptable->cbSize, ptable->u32Version));
     1421        Log(("SharedFolders host service: VBoxHGCMSvcLoad: ptable->cbSize = %u, ptable->u32Version = 0x%08X\n",
     1422             ptable->cbSize, ptable->u32Version));
    14201423
    14211424        if (    ptable->cbSize != sizeof (VBOXHGCMSVCFNTABLE)
    14221425            ||  ptable->u32Version != VBOX_HGCM_SVC_VERSION)
    14231426        {
    1424             LogRelFunc(("version mismatch loading shared folders service: ptable->cbSize = %d, should be %d, ptable->u32Version = 0x%08X, should be 0x%08X\n", ptable->cbSize, sizeof (VBOXHGCMSVCFNTABLE), ptable->u32Version, VBOX_HGCM_SVC_VERSION));
     1427            LogRelFunc(("SharedFolders host service: version mismatch while loading: ptable->cbSize = %u (should be %u), ptable->u32Version = 0x%08X (should be 0x%08X)\n",
     1428                        ptable->cbSize, sizeof (VBOXHGCMSVCFNTABLE), ptable->u32Version, VBOX_HGCM_SVC_VERSION));
    14251429            rc = VERR_VERSION_MISMATCH;
    14261430        }
     
    14501454    return rc;
    14511455}
     1456
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette