| 176 | /// The deployment must be a staged deployment. |
| 177 | #[allow(unsafe_code)] |
| 178 | pub fn change_finalization(&self, deployment: &ostree::Deployment) -> Result<()> { |
| 179 | use ostree::glib::translate::*; |
| 180 | use std::ptr; |
| 181 | unsafe { |
| 182 | let mut error = ptr::null_mut(); |
| 183 | let result = ostree::ffi::ostree_sysroot_change_finalization( |
| 184 | self.sysroot.to_glib_none().0, |
| 185 | deployment.to_glib_none().0, |
| 186 | &mut error, |
| 187 | ); |
| 188 | if result == 0 { |
| 189 | return Err(from_glib_full::<_, ostree::glib::Error>(error).into()); |
| 190 | } |
| 191 | Ok(()) |
| 192 | } |
| 193 | } |
| 194 | } |
| 195 | |
| 196 | #[cfg(test)] |