VirtualBox

Changeset 41754 in vbox


Ignore:
Timestamp:
Jun 15, 2012 1:03:05 PM (13 years ago)
Author:
vboxsync
Message:

VBoxManage/DebugVM: Fixed "--debug" parameter, fixed parameter settings for log, logdest and logflags.

File:
1 edited

Legend:

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

    r39675 r41754  
    55
    66/*
    7  * Copyright (C) 2010 Oracle Corporation
     7 * Copyright (C) 2012 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    169169    RTGETOPTSTATE               GetState;
    170170    RTGETOPTUNION               ValueUnion;
     171
     172    /** @todo Put short options into enum / defines! */
    171173    static const RTGETOPTDEF    s_aOptions[] =
    172174    {
    173         { "--release",      'r', RTGETOPT_REQ_NOTHING },
     175        { "--debug",        'd', RTGETOPT_REQ_NOTHING },
     176        { "--release",      'r', RTGETOPT_REQ_NOTHING }
    174177    };
    175     int rc = RTGetOptInit(&GetState, pArgs->argc, pArgs->argv, s_aOptions, RT_ELEMENTS(s_aOptions), 2, 0 /*fFlags*/);
     178    int rc = RTGetOptInit(&GetState, pArgs->argc, pArgs->argv, s_aOptions, RT_ELEMENTS(s_aOptions), 2, RTGETOPTINIT_FLAGS_OPTS_FIRST);
    176179    AssertRCReturn(rc, RTEXITCODE_FAILURE);
    177180
     
    188191                break;
    189192
    190             case VINF_GETOPT_NOT_OPTION:
     193            /* Because log strings can start with "-" (like "-all+dev_foo")
     194             * we have to take everything we got as a setting and apply it.
     195             * IPRT will take care of the validation afterwards. */
     196            default:
    191197                if (strSettings.length() == 0)
    192198                    strSettings = ValueUnion.psz;
     
    197203                }
    198204                break;
    199 
    200             default:
    201                 return errorGetOpt(USAGE_DEBUGVM, rc, &ValueUnion);
    202205        }
    203206    }
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