VirtualBox

Changeset 38625 in vbox


Ignore:
Timestamp:
Sep 5, 2011 8:50:00 AM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
73832
Message:

VBoxService/Toolbox: Don't output error messages when writing machine readable data.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceToolBox.cpp

    r38015 r38625  
    608608    if (RT_FAILURE(rc))
    609609    {
    610         RTMsgError("Failed to retrieve absolute path of '%s', rc=%Rrc\n", pszDir, rc);
     610        if (!(uOutputFlags & VBOXSERVICETOOLBOXOUTPUTFLAG_PARSEABLE))
     611            RTMsgError("Failed to retrieve absolute path of '%s', rc=%Rrc\n", pszDir, rc);
    611612        return rc;
    612613    }
     
    616617    if (RT_FAILURE(rc))
    617618    {
    618         RTMsgError("Failed to open directory '%s', rc=%Rrc\n", szPathAbs, rc);
     619        if (!(uOutputFlags & VBOXSERVICETOOLBOXOUTPUTFLAG_PARSEABLE))
     620            RTMsgError("Failed to open directory '%s', rc=%Rrc\n", szPathAbs, rc);
    619621        return rc;
    620622    }
     
    650652    if (RT_FAILURE(rc2))
    651653    {
    652         RTMsgError("Failed to close dir '%s', rc=%Rrc\n",
    653                    pszDir, rc2);
     654        if (!(uOutputFlags & VBOXSERVICETOOLBOXOUTPUTFLAG_PARSEABLE))
     655            RTMsgError("Failed to close dir '%s', rc=%Rrc\n",
     656                       pszDir, rc2);
    654657        if (RT_SUCCESS(rc))
    655658            rc = rc2;
     
    838841                if (RT_FAILURE(rc2))
    839842                {
    840                     RTMsgError("Cannot access '%s': No such file or directory\n",
    841                                pNodeIt->pszName);
     843                    if (!(fOutputFlags & VBOXSERVICETOOLBOXOUTPUTFLAG_PARSEABLE))
     844                        RTMsgError("Cannot access '%s': No such file or directory\n",
     845                                   pNodeIt->pszName);
    842846                    rc = VERR_FILE_NOT_FOUND;
    843847                    /* Do not break here -- process every element in the list
     
    10701074            if (RT_FAILURE(rc2))
    10711075            {
    1072                 RTMsgError("Cannot stat for '%s': No such file or directory\n",
    1073                            pNodeIt->pszName);
     1076                if (!(fOutputFlags & VBOXSERVICETOOLBOXOUTPUTFLAG_PARSEABLE))
     1077                    RTMsgError("Cannot stat for '%s': No such file or directory\n",
     1078                               pNodeIt->pszName);
    10741079                rc = VERR_FILE_NOT_FOUND;
    10751080                /* Do not break here -- process every element in the list
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