Skip to content

Commit 862713e

Browse files
committed
Use vectorized flag uuid correctly
Split by commas first, then use the corresponding one for each instance. Bug: 418796359 Merged-In: I5511f15fd9bcaf149e72609bfa83799505624cbc
1 parent 4ffec0c commit 862713e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

base/cvd/cuttlefish/host/commands/assemble_cvd/assemble_cvd_flags.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ DEFINE_vec(
229229
"with the instance number to support multiple instances");
230230

231231
DEFINE_vec(uuid, CF_DEFAULTS_UUID,
232-
"UUID to use for the device. Random if not specified");
232+
"UUID to use for the device. Random if not specified");
233233
DEFINE_vec(daemon, CF_DEFAULTS_DAEMON?"true":"false",
234234
"Run cuttlefish in background, the launcher exits on boot "
235235
"completed/failed");

base/cvd/cuttlefish/host/commands/assemble_cvd/flags.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,7 @@ Result<CuttlefishConfig> InitializeCuttlefishConfiguration(
492492
std::vector<bool> use_sdcard_vec = CF_EXPECT(GET_FLAG_BOOL_VALUE(use_sdcard));
493493
std::vector<bool> pause_in_bootloader_vec = CF_EXPECT(GET_FLAG_BOOL_VALUE(
494494
pause_in_bootloader));
495+
std::vector<std::string> uuid_vec = CF_EXPECT(GET_FLAG_STR_VALUE(uuid));
495496
std::vector<bool> daemon_vec = CF_EXPECT(GET_FLAG_BOOL_VALUE(daemon));
496497
std::vector<bool> enable_minimal_mode_vec = CF_EXPECT(GET_FLAG_BOOL_VALUE(
497498
enable_minimal_mode));
@@ -1010,7 +1011,7 @@ Result<CuttlefishConfig> InitializeCuttlefishConfiguration(
10101011

10111012
bool is_any_netsim = is_netsim_all || is_bt_netsim || is_uwb_netsim;
10121013

1013-
instance.set_uuid(FLAGS_uuid);
1014+
instance.set_uuid(uuid_vec[instance_index]);
10141015

10151016
instance.set_environment_name(environment_name);
10161017

0 commit comments

Comments
 (0)