69 { 0x20029a73, DESC("n8") }, // Likewise... |
70 { 0x20029a73, DESC("n8") }, // Likewise... |
70 { 0x102734e3, DESC("qemu") }, |
71 { 0x102734e3, DESC("qemu") }, |
71 }; |
72 }; |
72 const TInt KMachineIdVariantCount = sizeof(KMachineIdVariants) / sizeof(TVariant); |
73 const TInt KMachineIdVariantCount = sizeof(KMachineIdVariants) / sizeof(TVariant); |
73 |
74 |
|
75 // This is a list of things configured in or out at compile time based on the platform.mmh macros and similar |
|
76 const LtkUtils::SLitC KOtherSupportedVariants[] = |
|
77 { |
|
78 #ifdef __WINS__ |
|
79 DESC("wins"), |
|
80 #else |
|
81 DESC("target"), |
|
82 #endif |
|
83 #ifdef FSHELL_TRACECORE_SUPPORT |
|
84 DESC("tracecore-support"), |
|
85 #endif |
|
86 }; |
|
87 const TInt KOtherSupportedVariantsCount = sizeof(KOtherSupportedVariants) / sizeof(LtkUtils::SLitC); |
|
88 |
74 void CCmdVariant::DoRunL() |
89 void CCmdVariant::DoRunL() |
75 { |
90 { |
76 if (iList) |
91 TInt localMachineUid = GetMachineUidL(); |
|
92 |
|
93 if (iMachineId.Count() == 0 && iVariant.Count() == 0) |
77 { |
94 { |
78 Printf(_L("Supported variants: ")); |
95 Printf(_L("Variant names understood by this command: ")); |
79 for (TInt i = 0; i < KMachineIdVariantCount; i++) |
96 for (TInt i = 0; i < KMachineIdVariantCount; i++) |
80 { |
97 { |
81 Printf(_L("%S, "), &KMachineIdVariants[i].iName); |
98 Printf(_L("%S, "), &KMachineIdVariants[i].iName); |
82 } |
99 } |
83 // Finally add the ones which don't appear in KMachineIdVariants |
100 // Finally add the ones which can appear in KOtherSupportedVariants |
84 Write(_L("wins, target\r\n")); |
101 Printf(_L("wins, target, tracecore-support\r\n")); |
|
102 |
|
103 Printf(_L("Variant names supported by this device: ")); |
|
104 for (TInt i = 0; i < KMachineIdVariantCount; i++) |
|
105 { |
|
106 if (localMachineUid == KMachineIdVariants[i].iUid) |
|
107 { |
|
108 Printf(_L("%S, "), &KMachineIdVariants[i].iName); |
|
109 } |
|
110 } |
|
111 for (TInt i = 0; i < KOtherSupportedVariantsCount; i++) |
|
112 { |
|
113 if (i > 0) Printf(_L(", ")); |
|
114 Printf(KOtherSupportedVariants[i]()); |
|
115 } |
|
116 Printf(_L("\r\n")); |
85 Complete(KErrNone); |
117 Complete(KErrNone); |
86 return; |
118 return; |
87 } |
119 } |
88 |
120 |
89 if (iMachineId.Count() == 0 && iVariant.Count() == 0) |
|
90 { |
|
91 LeaveIfErr(KErrArgument, _L("You must specify at least one <variantname> argument or --uid option")); |
|
92 } |
|
93 |
|
94 TInt localMachineUid = GetMachineUidL(); |
|
95 TBool match = EFalse; |
121 TBool match = EFalse; |
96 if (iMachineId.Count()) |
122 if (iMachineId.Count()) |
97 { |
123 { |
98 for (TInt i = 0; i < iMachineId.Count(); i++) |
124 for (TInt i = 0; i < iMachineId.Count(); i++) |
99 { |
125 { |