VirtualBox

Changeset 89915 in vbox


Ignore:
Timestamp:
Jun 25, 2021 3:42:07 PM (4 years ago)
Author:
vboxsync
Message:

Frontends/VBoxManage: A bit of improvement for "list --multiple" (which is still undocumented), continuing if a list reports an error and showing a heading for each list.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp

    r86142 r89915  
    22102210    bool                fOptMultiple  = false;
    22112211    bool                fOptSorted    = false;
     2212    bool                fFirst        = true;
    22122213    enum ListType_T     enmOptCommand = kListNotSpecified;
     2214    RTEXITCODE          rcExit = RTEXITCODE_SUCCESS;
    22132215
    22142216    static const RTGETOPTDEF s_aListOptions[] =
     
    23122314                if (fOptMultiple)
    23132315                {
     2316                    if (fFirst)
     2317                        fFirst = false;
     2318                    else
     2319                        RTPrintf("\n");
     2320                    RTPrintf("[%s]\n", ValueUnion.pDef->pszLong);
    23142321                    HRESULT hrc = produceList(enmOptCommand, fOptLong, fOptSorted, a->virtualBox);
    23152322                    if (FAILED(hrc))
    2316                         return RTEXITCODE_FAILURE;
     2323                        rcExit = RTEXITCODE_FAILURE;
    23172324                }
    23182325                break;
     
    23352342        HRESULT hrc = produceList(enmOptCommand, fOptLong, fOptSorted, a->virtualBox);
    23362343        if (FAILED(hrc))
    2337             return RTEXITCODE_FAILURE;
    2338     }
    2339 
    2340     return RTEXITCODE_SUCCESS;
     2344            rcExit = RTEXITCODE_FAILURE;
     2345    }
     2346
     2347    return rcExit;
    23412348}
    23422349
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