# HG changeset patch # User Tom Sutcliffe # Date 1282832888 -3600 # Node ID 4a2ffd3562a333ba61f8e30bbbb8ae6348c24a57 # Parent d9b3ed11f0174cd1adc4fd3e5f3c823d44314a05 Added --list option to variant command diff -r d9b3ed11f017 -r 4a2ffd3562a3 commands/variant/variant.cif --- a/commands/variant/variant.cif Thu Aug 26 11:47:04 2010 +0100 +++ b/commands/variant/variant.cif Thu Aug 26 15:28:08 2010 +0100 @@ -36,6 +36,10 @@ Display verbose output. +==option bool l list + +List the variant names that this command understands. Note this is all of them, not just the ones that match the current platform. + ==argument string variantname optional multiple A symbolic name for the hardware variant may be specified instead of having to know the machine uid. This maximises compatibility with platforms that provide a custom variant.exe and/or that need more than just the machine UID to determine the variant. Check the platform-specific documentation for what variant string is used to identify that platform's hardware. If multiple variant names are specified KErrNone is returned if any one of them matches. diff -r d9b3ed11f017 -r 4a2ffd3562a3 commands/variant/variant.cpp --- a/commands/variant/variant.cpp Thu Aug 26 11:47:04 2010 +0100 +++ b/commands/variant/variant.cpp Thu Aug 26 15:28:08 2010 +0100 @@ -72,6 +72,19 @@ void CCmdVariant::DoRunL() { + if (iList) + { + Printf(_L("Supported variants: ")); + for (TInt i = 0; i < KMachineIdVariantCount; i++) + { + Printf(_L("%S, "), &KMachineIdVariants[i].iName); + } + // Finally add the ones which don't appear in KMachineIdVariants + Write(_L("wins, target\r\n")); + Complete(KErrNone); + return; + } + if (iMachineId.Count() == 0 && iVariant.Count() == 0) { LeaveIfErr(KErrArgument, _L("You must specify at least one argument or --uid option")); @@ -137,6 +150,8 @@ aOptions.AppendUintL(iMachineId, KCmdOptUid); _LIT(KOptVerbose, "verbose"); aOptions.AppendBoolL(iVerbose, KOptVerbose); + _LIT(KOptList, "list"); + aOptions.AppendBoolL(iList, KOptList); } // diff -r d9b3ed11f017 -r 4a2ffd3562a3 commands/variant/variant.h --- a/commands/variant/variant.h Thu Aug 26 11:47:04 2010 +0100 +++ b/commands/variant/variant.h Thu Aug 26 15:28:08 2010 +0100 @@ -32,4 +32,5 @@ RArray iMachineId; RPointerArray iVariant; TBool iVerbose; + TBool iList; };