Skip to content

Commit 8c005f5

Browse files
committed
status: Rename human status writer functions
For increased clarity, prep for further changes. Signed-off-by: Colin Walters <[email protected]>
1 parent 0371407 commit 8c005f5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/src/status.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ fn write_row_name(mut out: impl Write, s: &str, prefix_len: usize) -> Result<()>
359359
}
360360

361361
/// Write the data for a container image based status.
362-
fn human_render_imagestatus(
362+
fn human_render_slot(
363363
mut out: impl Write,
364364
slot: Slot,
365365
image: &crate::spec::ImageStatus,
@@ -410,7 +410,8 @@ fn human_render_imagestatus(
410410
Ok(())
411411
}
412412

413-
fn human_render_ostree(mut out: impl Write, slot: Slot, ostree_commit: &str) -> Result<()> {
413+
/// Output a rendering of a non-container boot entry.
414+
fn human_render_slot_ostree(mut out: impl Write, slot: Slot, ostree_commit: &str) -> Result<()> {
414415
// TODO consider rendering more ostree stuff here like rpm-ostree status does
415416
let prefix = match slot {
416417
Slot::Staged => " Staged ostree".into(),
@@ -438,9 +439,9 @@ fn human_readable_output_booted(mut out: impl Write, host: &Host) -> Result<()>
438439
writeln!(out)?;
439440
}
440441
if let Some(image) = &host_status.image {
441-
human_render_imagestatus(&mut out, slot_name, image)?;
442+
human_render_slot(&mut out, slot_name, image)?;
442443
} else if let Some(ostree) = host_status.ostree.as_ref() {
443-
human_render_ostree(&mut out, slot_name, &ostree.checksum)?;
444+
human_render_slot_ostree(&mut out, slot_name, &ostree.checksum)?;
444445
} else {
445446
writeln!(out, "Current {slot_name} state is unknown")?;
446447
}

0 commit comments

Comments
 (0)