File tree Expand file tree Collapse file tree 2 files changed +27
-2
lines changed Expand file tree Collapse file tree 2 files changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -748,12 +748,12 @@ fn should_soft_reboot(
748
748
) -> Result < bool > {
749
749
// Get updated status to check for soft-reboot capability
750
750
let ( _deployments, updated_host) = crate :: status:: get_status ( sysroot, booted_deployment) ?;
751
-
751
+
752
752
// Check if there's a staged deployment that can perform soft reboot
753
753
if can_perform_soft_reboot ( updated_host. status . staged . as_ref ( ) ) {
754
754
soft_reboot_staged ( sysroot) ?;
755
755
return Ok ( true ) ;
756
- }
756
+ }
757
757
// TODO check if this reboot is doing a rollback...
758
758
// TODO then perform a soft reboot for the rollback deployment
759
759
Ok ( false )
Original file line number Diff line number Diff line change @@ -467,6 +467,18 @@ fn human_render_slot(
467
467
}
468
468
}
469
469
}
470
+
471
+ // Show soft-reboot capability
472
+ write_row_name ( & mut out, "Soft-reboot capable" , prefix_len) ?;
473
+ writeln ! (
474
+ out,
475
+ "{}" ,
476
+ if entry. soft_reboot_capable {
477
+ "yes"
478
+ } else {
479
+ "no"
480
+ }
481
+ ) ?;
470
482
}
471
483
472
484
tracing:: debug!( "pinned={}" , entry. pinned) ;
@@ -504,6 +516,18 @@ fn human_render_slot_ostree(
504
516
if let Some ( ostree) = & entry. ostree {
505
517
render_verbose_ostree_info ( & mut out, ostree, slot, prefix_len) ?;
506
518
}
519
+
520
+ // Show soft-reboot capability
521
+ write_row_name ( & mut out, "Soft-reboot capable" , prefix_len) ?;
522
+ writeln ! (
523
+ out,
524
+ "{}" ,
525
+ if entry. soft_reboot_capable {
526
+ "yes"
527
+ } else {
528
+ "no"
529
+ }
530
+ ) ?;
507
531
}
508
532
509
533
tracing:: debug!( "pinned={}" , entry. pinned) ;
@@ -725,5 +749,6 @@ mod tests {
725
749
assert ! ( w. contains( "Deploy serial:" ) ) ;
726
750
assert ! ( w. contains( "Staged:" ) ) ;
727
751
assert ! ( w. contains( "Commit:" ) ) ;
752
+ assert ! ( w. contains( "Soft-reboot capable:" ) ) ;
728
753
}
729
754
}
You can’t perform that action at this time.
0 commit comments