@@ -359,9 +359,10 @@ fn write_row_name(mut out: impl Write, s: &str, prefix_len: usize) -> Result<()>
359
359
}
360
360
361
361
/// Write the data for a container image based status.
362
- fn human_render_imagestatus (
362
+ fn human_render_slot (
363
363
mut out : impl Write ,
364
364
slot : Slot ,
365
+ entry : & crate :: spec:: BootEntry ,
365
366
image : & crate :: spec:: ImageStatus ,
366
367
) -> Result < ( ) > {
367
368
let transport = & image. image . transport ;
@@ -407,10 +408,18 @@ fn human_render_imagestatus(
407
408
writeln ! ( out, "{timestamp}" ) ?;
408
409
}
409
410
411
+ tracing:: debug!( "pinned={}" , entry. pinned) ;
412
+
410
413
Ok ( ( ) )
411
414
}
412
415
413
- fn human_render_ostree ( mut out : impl Write , slot : Slot , ostree_commit : & str ) -> Result < ( ) > {
416
+ /// Output a rendering of a non-container boot entry.
417
+ fn human_render_slot_ostree (
418
+ mut out : impl Write ,
419
+ slot : Slot ,
420
+ entry : & crate :: spec:: BootEntry ,
421
+ ostree_commit : & str ,
422
+ ) -> Result < ( ) > {
414
423
// TODO consider rendering more ostree stuff here like rpm-ostree status does
415
424
let prefix = match slot {
416
425
Slot :: Staged => " Staged ostree" . into ( ) ,
@@ -421,6 +430,7 @@ fn human_render_ostree(mut out: impl Write, slot: Slot, ostree_commit: &str) ->
421
430
writeln ! ( out, "{prefix}" ) ?;
422
431
write_row_name ( & mut out, "Commit" , prefix_len) ?;
423
432
writeln ! ( out, "{ostree_commit}" ) ?;
433
+ tracing:: debug!( "pinned={}" , entry. pinned) ;
424
434
Ok ( ( ) )
425
435
}
426
436
@@ -438,9 +448,9 @@ fn human_readable_output_booted(mut out: impl Write, host: &Host) -> Result<()>
438
448
writeln ! ( out) ?;
439
449
}
440
450
if let Some ( image) = & host_status. image {
441
- human_render_imagestatus ( & mut out, slot_name, image) ?;
451
+ human_render_slot ( & mut out, slot_name, host_status , image) ?;
442
452
} else if let Some ( ostree) = host_status. ostree . as_ref ( ) {
443
- human_render_ostree ( & mut out, slot_name, & ostree. checksum ) ?;
453
+ human_render_slot_ostree ( & mut out, slot_name, host_status , & ostree. checksum ) ?;
444
454
} else {
445
455
writeln ! ( out, "Current {slot_name} state is unknown" ) ?;
446
456
}
0 commit comments