@@ -754,8 +754,8 @@ pub(crate) fn require_root(is_container: bool) -> Result<()> {
754754 Ok ( ( ) )
755755}
756756
757- /// Check if a deployment can perform a soft reboot
758- fn can_perform_soft_reboot ( deployment : Option < & crate :: spec:: BootEntry > ) -> bool {
757+ /// Check if a deployment has soft reboot capability
758+ fn has_soft_reboot_capability ( deployment : Option < & crate :: spec:: BootEntry > ) -> bool {
759759 deployment. map ( |d| d. soft_reboot_capable ) . unwrap_or ( false )
760760}
761761
@@ -907,7 +907,7 @@ async fn upgrade(opts: UpgradeOpts) -> Result<()> {
907907 if staged_unchanged {
908908 println ! ( "Staged update present, not changed." ) ;
909909 if opts. queue_soft_reboot {
910- if can_perform_soft_reboot ( host. status . staged . as_ref ( ) ) {
910+ if has_soft_reboot_capability ( host. status . staged . as_ref ( ) ) {
911911 soft_reboot_staged ( sysroot) ?;
912912 }
913913 }
@@ -936,7 +936,7 @@ async fn upgrade(opts: UpgradeOpts) -> Result<()> {
936936 // At this point we have new staged deployment and the host definition has changed.
937937 // We need the updated host status before we check if we can prepare the soft-reboot.
938938 let updated_host = crate :: status:: get_status ( sysroot, Some ( & booted_deployment) ) ?. 1 ;
939- if can_perform_soft_reboot ( updated_host. status . staged . as_ref ( ) ) {
939+ if has_soft_reboot_capability ( updated_host. status . staged . as_ref ( ) ) {
940940 soft_reboot_staged ( sysroot) ?;
941941 }
942942 }
@@ -1020,7 +1020,7 @@ async fn switch(opts: SwitchOpts) -> Result<()> {
10201020 // At this point we have staged the deployment and the host definition has changed.
10211021 // We need the updated host status before we check if we can prepare the soft-reboot.
10221022 let updated_host = crate :: status:: get_status ( sysroot, Some ( & booted_deployment) ) ?. 1 ;
1023- if can_perform_soft_reboot ( updated_host. status . staged . as_ref ( ) ) {
1023+ if has_soft_reboot_capability ( updated_host. status . staged . as_ref ( ) ) {
10241024 soft_reboot_staged ( sysroot) ?;
10251025 }
10261026 }
@@ -1042,7 +1042,7 @@ async fn rollback(opts: RollbackOpts) -> Result<()> {
10421042 // Get status after the rollback is done to check soft-reboot capability
10431043 let host = crate :: status:: get_status_require_booted ( sysroot) ?. 2 ;
10441044
1045- if can_perform_soft_reboot ( host. status . rollback . as_ref ( ) ) {
1045+ if has_soft_reboot_capability ( host. status . rollback . as_ref ( ) ) {
10461046 println ! ( "Rollback deployment is soft-reboot capable, preparing for soft-reboot..." ) ;
10471047
10481048 let deployments_list = sysroot. deployments ( ) ;
0 commit comments