Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
396 changes: 392 additions & 4 deletions Cargo.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ rust-version = "1.91" # if this changes, edit ci.yaml as well!
# `git`-based deps
gimlet-inspector-protocol = { git = "https://github.com/oxidecomputer/gimlet-inspector-protocol" }
hif = { git = "https://github.com/oxidecomputer/hif" }
hubtools = { git = "https://github.com/oxidecomputer/hubtools.git" }
humpty = { git = "https://github.com/oxidecomputer/humpty", version = "0.1.5" }
idol = { git = "https://github.com/oxidecomputer/idolatry.git" }
idt8a3xxxx = { git = "https://github.com/oxidecomputer/idt8a3xxxx" }
Expand Down
11 changes: 7 additions & 4 deletions cmd/extract/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,14 @@ struct ExtractArgs {
}

fn extract(context: &mut ExecutionContext) -> Result<()> {
let archive = context.cli.raw_archive()?;
let subargs = ExtractArgs::try_parse_from(&context.cli.cmd)?;
let archive = context.cli.raw_archive()?;

if subargs.list {
let cursor = Cursor::new(archive);
// We convert the archive data back into a `ZipArchive` instead of using
// `RawHubrisArchive` functions for speed; the `ZipArchive` can report
// file size without uncompressing.
let cursor = Cursor::new(archive.zip);
let mut archive = zip::ZipArchive::new(cursor)?;

println!("{:>12} NAME", "SIZE");
Expand All @@ -172,7 +175,7 @@ fn extract(context: &mut ExecutionContext) -> Result<()> {
}

let buffer = if let Some(ref filename) = subargs.file {
let cursor = Cursor::new(archive);
let cursor = Cursor::new(archive.zip);
let mut archive = zip::ZipArchive::new(cursor)?;
let mut found = vec![];

Expand Down Expand Up @@ -211,7 +214,7 @@ fn extract(context: &mut ExecutionContext) -> Result<()> {
file.read_to_end(&mut buffer)?;
buffer
} else {
archive.to_vec()
archive.zip.to_vec()
};

if let Some(output) = subargs.output {
Expand Down
Binary file removed humility-bin/tests/cmd/cores/hubris.core.chilly.0
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed humility-bin/tests/cmd/cores/hubris.core.spoopy.0
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

Empty file.
12 changes: 0 additions & 12 deletions humility-bin/tests/cmd/counters-arg/counters-arg.chilly.0.toml

This file was deleted.

This file was deleted.

Empty file.

This file was deleted.

This file was deleted.

Empty file.

This file was deleted.

This file was deleted.

Empty file.
12 changes: 0 additions & 12 deletions humility-bin/tests/cmd/counters-arg/counters-arg.spoopy.0.toml

This file was deleted.

This file was deleted.

Empty file.

This file was deleted.

This file was deleted.

Empty file.

This file was deleted.

This file was deleted.

Empty file.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Empty file.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Empty file.
11 changes: 0 additions & 11 deletions humility-bin/tests/cmd/counters-csv/counters-csv.chilly.0.toml

This file was deleted.

This file was deleted.

Empty file.

This file was deleted.

This file was deleted.

Empty file.

This file was deleted.

This file was deleted.

Empty file.
11 changes: 0 additions & 11 deletions humility-bin/tests/cmd/counters-csv/counters-csv.spoopy.0.toml

This file was deleted.

This file was deleted.

Empty file.

This file was deleted.

This file was deleted.

Empty file.

This file was deleted.

This file was deleted.

Empty file.
11 changes: 0 additions & 11 deletions humility-bin/tests/cmd/counters-full/counters-full.chilly.0.toml

This file was deleted.

This file was deleted.

Empty file.

This file was deleted.

This file was deleted.

Empty file.

This file was deleted.

This file was deleted.

Empty file.
12 changes: 0 additions & 12 deletions humility-bin/tests/cmd/counters-full/counters-full.spoopy.0.toml

This file was deleted.

This file was deleted.

Empty file.

This file was deleted.

This file was deleted.

Empty file.

This file was deleted.

This file was deleted.

Loading
Loading