Drop 0-length ramdisks unconditionally
BUG: 110962084
Test: Local build dist and boot with modified crun
Change-Id: Id437120070b26635c3de9ab19c6b01aced002640
Merged-In: Id437120070b26635c3de9ab19c6b01aced002640
(cherry picked from commit d46a4c27ad8b2ee7a701c3314bf1977956a84eb8)
diff --git a/host/commands/launch/main.cc b/host/commands/launch/main.cc
index 35c73d4..90bb752 100644
--- a/host/commands/launch/main.cc
+++ b/host/commands/launch/main.cc
@@ -455,10 +455,9 @@
}
if (FLAGS_initrd.empty()) {
FLAGS_initrd = FLAGS_system_image_dir + "/ramdisk.img";
- if (!FileHasContent(FLAGS_initrd.c_str())) {
- LOG(WARNING) << "No ramdisk.img found; assuming system-as-root build";
- FLAGS_initrd.clear();
- }
+ }
+ if (!FileHasContent(FLAGS_initrd.c_str())) {
+ FLAGS_initrd.clear();
}
if (FLAGS_dtb.empty()) {
if (FLAGS_initrd.empty()) {