mailbox_client: filter GetBuiltins return
The addition of build artifacts to the tarball causes the GetBuiltins
return list to overflow. Add a temporary hack to filter out known build
artifacts (may be better to selectively include instead).
Change-Id: Ife1901859e8b710cd9d243f0a1e3b291a4a0390a
diff --git a/app/src/mailbox_client.rs b/app/src/mailbox_client.rs
index 3993ab2..671542f 100644
--- a/app/src/mailbox_client.rs
+++ b/app/src/mailbox_client.rs
@@ -207,12 +207,16 @@
let (status, name_len, next_fid) = get_name_result.into_inner();
if !status.unwrap() { break; }
if let Ok(str) = core::str::from_utf8(&name[..name_len]) {
- // XXX filter non-builtins? (harder if capdl-loader cpio archive is expanded)
+ // XXX maybe explicitly include instead of filtering out?
match str {
- "kernel" |
- "capdl-loader" |
- "matcha-tock-bundle.bin" => {}
- _ => names.push(str.to_string()),
+ // Filter bootstrap artifacts.
+ "kernel" | "capdl-loader" | "matcha-tock-bundle.bin" => {}
+ _ => {
+ // Filter CAmkES component executables.
+ if !str.ends_with("_group_bin") {
+ names.push(str.to_string());
+ }
+ }
}
}
fid = next_fid as u32;