VirtualBox

Changeset 71349 in vbox


Ignore:
Timestamp:
Mar 15, 2018 11:23:39 AM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
121300
Message:

Guest Control/Main: Added (COM) error codes VERR_GSTCTL_MAX_OBJECTS_REACHED, VBOX_E_MAXIMUM_REACHED and VBOX_E_GSTCTL_GUEST_ERROR; make use of those when creating guest control objects, such as guest sessions, files and directories.

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/err.h

    r71222 r71349  
    27092709/** Started guest process terminated with an exit code <> 0. */
    27102710#define VWRN_GSTCTL_PROCESS_EXIT_CODE               6221
     2711/** Maximum objects has been reached. */
     2712#define VERR_GSTCTL_MAX_OBJECTS_REACHED             (-6222)
    27112713/** @} */
    27122714
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r71347 r71349  
    432432    <desc>
    433433      A provided password was incorrect.
     434    </desc>
     435  </result>
     436
     437  <result name="VBOX_E_MAXIMUM_REACHED" value="0x80BB000E">
     438    <desc>
     439      A maximum has been reached.
     440    </desc>
     441  </result>
     442
     443  <result name="VBOX_E_GSTCTL_GUEST_ERROR" value="0x80BB000F">
     444    <desc>
     445      Guest Control reported an error from the guest side.
    434446    </desc>
    435447  </result>
     
    1188211894
    1188311895      There can be up to 2048 objects (guest processes, files and directories)
    11884       a time per guest session.  Exceeding the limit will result in an error.
    11885 <!-- @todo r=bird: Add specific VBOX_E_XXX error for this and document it here! -->
     11896      a time per guest session.  Exceeding the limit will result in an error (see
     11897      the corresponding functions for more).
    1188611898
    1188711899      When done with either of these objects, including the guest session itself,
     
    1220612218          Error while opening the directory.
    1220712219        </result>
     12220        <result name="VBOX_E_MAXIMUM_REACHED">
     12221          The maximum of concurrent guest directories has been reached.
     12222        </result>
    1220812223      </desc>
    1220912224      <param name="path" type="wstring" dir="in">
     
    1251312528          Error while opening the file.
    1251412529        </result>
     12530        <result name="VBOX_E_MAXIMUM_REACHED">
     12531          The maximum of concurrent guest files has been reached.
     12532        </result>
    1251512533      </desc>
    1251612534      <param name="path" type="wstring" dir="in">
     
    1279512813        <result name="VBOX_E_IPRT_ERROR">
    1279612814          Error creating guest process.
     12815        </result>
     12816
     12817        <result name="VBOX_E_MAXIMUM_REACHED">
     12818          The maximum of concurrent guest processes has been reached.
    1279712819        </result>
    1279812820      </desc>
     
    1392113943
    1392213944        There can be a maximum of 32 sessions at once per VM.  An error will
    13923         be returned if this has been reached. <!-- This should actually read:
    13924         VBOX_E_IPRT_ERROR will be return if this limit has been reached.
    13925         However, keep in mind that VBOX_E_IPRT_ERROR can be returned for about
    13926         88 unrelated reasons, so you don't know what happend unless you parse
    13927         the error text. (bird) -->
    13928 <!-- @todo r=bird: Seriously, add an dedicated VBOX_E_MAX_GUEST_SESSIONS status
    13929 for this condition.  Do the same for all other maximums and things that could be
    13930 useful to the API client. -->
     13945        be returned if this has been reached.
    1393113946
    1393213947        For more information please consult <link to="IGuestSession"/>
     13948
     13949        <result name="VBOX_E_IPRT_ERROR">
     13950          Error creating guest session.
     13951        </result>
     13952
     13953        <result name="VBOX_E_MAXIMUM_REACHED">
     13954          The maximum of concurrent guest sessions has been reached.
     13955        </result>
    1393313956      </desc>
    1393413957      <param name="user" type="wstring" dir="in">
  • trunk/src/VBox/Main/src-all/Global.cpp

    r70561 r71349  
    77
    88/*
    9  * Copyright (C) 2008-2017 Oracle Corporation
     9 * Copyright (C) 2008-2018 Oracle Corporation
    1010 *
    1111 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    744744        case VERR_ACCESS_DENIED:                return E_ACCESSDENIED;
    745745
    746         /* VirtualBox COM status codes */
     746        /* VirtualBox COM status codes. */
    747747        case VERR_COM_OBJECT_NOT_FOUND:         return VBOX_E_OBJECT_NOT_FOUND;
    748748        case VERR_COM_INVALID_VM_STATE:         return VBOX_E_INVALID_VM_STATE;
     
    763763        case VERR_FILE_NOT_FOUND:               return VBOX_E_OBJECT_NOT_FOUND;
    764764
     765        /* Guest Control errors. */
     766        case VERR_GSTCTL_MAX_OBJECTS_REACHED:   return VBOX_E_MAXIMUM_REACHED;
     767        case VERR_GSTCTL_GUEST_ERROR:           return VBOX_E_GSTCTL_GUEST_ERROR;
     768
    765769        default:
    766770            AssertMsgFailed(("%Rrc\n", aVBoxStatus));
  • trunk/src/VBox/Main/src-client/GuestCtrlImpl.cpp

    r71345 r71349  
    420420        {
    421421            case VERR_MAX_PROCS_REACHED:
    422                 hr = setError(VBOX_E_IPRT_ERROR, tr("Maximum number of concurrent guest sessions (%ld) reached"),
     422                hr = setError(VBOX_E_MAXIMUM_REACHED, tr("Maximum number of concurrent guest sessions (%ld) reached"),
    423423                              VBOX_GUESTCTRL_MAX_SESSIONS);
    424424                break;
  • trunk/src/VBox/Main/src-client/GuestProcessImpl.cpp

    r71345 r71349  
    540540            break;
    541541
    542         case VERR_MAX_PROCS_REACHED:
     542        case VERR_GSTCTL_MAX_OBJECTS_REACHED:
    543543            strError += Utf8StrFmt(tr("Maximum number of concurrent guest processes has been reached"));
    544544            break;
  • trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp

    r71345 r71349  
    971971    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    972972
    973     int rc = VERR_MAX_PROCS_REACHED;
     973    int rc = VERR_GSTCTL_MAX_OBJECTS_REACHED;
    974974    if (mData.mNumObjects >= VBOX_GUESTCTRL_MAX_OBJECTS)
    975975        return rc;
     
    13491349    }
    13501350
    1351     int rc = VERR_MAX_PROCS_REACHED;
     1351    int rc = VERR_GSTCTL_MAX_OBJECTS_REACHED;
    13521352    if (mData.mNumObjects >= VBOX_GUESTCTRL_MAX_OBJECTS)
    13531353        return rc;
     
    15681568            break;
    15691569
    1570         case VERR_MAX_PROCS_REACHED:
     1570        case VERR_GSTCTL_MAX_OBJECTS_REACHED:
    15711571            strError += Utf8StrFmt(tr("Maximum number of concurrent guest processes has been reached"));
    15721572            break;
     
    21292129    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    21302130
    2131     int rc = VERR_MAX_PROCS_REACHED;
     2131    int rc = VERR_GSTCTL_MAX_OBJECTS_REACHED;
    21322132    if (mData.mNumObjects >= VBOX_GUESTCTRL_MAX_OBJECTS)
    21332133        return rc;
     
    37963796            }
    37973797        }
    3798         else if (vrc == VERR_MAX_PROCS_REACHED)
     3798        else if (vrc == VERR_GSTCTL_MAX_OBJECTS_REACHED)
    37993799            hr = setErrorVrc(vrc, tr("Maximum number of concurrent guest processes per session (%u) reached"),
    38003800                             VBOX_GUESTCTRL_MAX_OBJECTS);
Note: See TracChangeset for help on using the changeset viewer.

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