pub fn verify_bootable(&mut self) -> bool {
        if self.footer.success() {
            return true;
        }

        if self.footer.failure() || self.footer.invalid() {
            return false;
        }

        if !self.footer.valid() {
            if crc::is_valid(unsafe {
                slice::from_raw_parts(
                    match self.footer.start_address() {
                        Some(addr) => addr as *const u8,
                        None => return false,
                    },
                    self.footer.length() as usize,
                )
            }) {
                self.footer.set_valid()
            } else {
                self.footer.set_invalid();
                return false;
            }
        }

        self.footer.attempts() > 0
    }
/// Determines if the image can be booted.
///
/// If the image has not been marked as having succeeded or failed to boot, its checksum will
/// be verified and the validity recorded.
Determines if the image can be booted.
If the image has not been marked as having succeeded or failed to boot, its checksum will
be verified and the validity recorded.
Determines if the image can be booted . If the image has not been marked as having succeeded or failed to boot its checksum will be verified and the validity recorded .
pub fn verify_bootable(&mut self) -> bool {
        if self.footer.success() {
            return true;
        }
        if self.footer.failure() || self.footer.invalid() {
            return false;
        }
        if !self.footer.valid() {
            if crc::is_valid(unsafe {
                slice::from_raw_parts(
                    match self.footer.start_address() {
                        Some(addr) => addr as *const u8,
                        None => return false,
                    },
                    self.footer.length() as usize,
                )
            }) {
                self.footer.set_valid()
            } else {
                self.footer.set_invalid();
                return false;
            }
        }
        self.footer.attempts() > 0
    }
pub fn verify_bootable ( & mut self ) -> bool { if self . footer . success ( ) { return true ; } if self . footer . failure ( ) || self . footer . invalid ( ) { return false ; } if ! self . footer . valid ( ) { if crc :: is_valid ( unsafe { slice :: from_raw_parts ( match self . footer . start_address ( ) { Some ( addr ) => addr as * const u8 , None => return false , } , self . footer . length ( ) as usize , ) } ) { self . footer . set_valid ( ) } else { self . footer . set_invalid ( ) ; return false ; } } self . footer . attempts ( ) > 0 }
Determines if the image can be booted.
Determines if the image can be booted .
&mut self
&mut self