@@ -47,8 +47,6 @@ pub enum Command {
47
47
#[ clap( short, long) ]
48
48
force : bool ,
49
49
} ,
50
- /// Read version and epoch values from an image.
51
- ReadVersion ,
52
50
/// Replaces the binary image within an archive with a different binary
53
51
/// image, supplied on the command line as a raw (BIN) file.
54
52
///
@@ -167,28 +165,6 @@ fn main() -> Result<()> {
167
165
archive. erase_caboose ( ) ?;
168
166
archive. overwrite ( ) ?;
169
167
}
170
- Command :: ReadVersion => {
171
- // Some images are missing an ImageHeader (old bootleby images),
172
- // or have no caboose, or have no caboose with an `EPOC` value.
173
- // The default epoch value is zero.
174
-
175
- let ( version, epoch) = if let Ok ( caboose) = archive. read_caboose ( ) {
176
- let version = match caboose. version ( ) {
177
- Ok ( vers) => {
178
- std:: str:: from_utf8 ( vers) . unwrap_or ( "" ) . to_string ( )
179
- }
180
- Err ( _) => "" . to_string ( ) ,
181
- } ;
182
- let epoch = caboose. epoch_u32 ( ) . unwrap_or ( 0u32 ) ;
183
- ( version. clone ( ) , epoch)
184
- } else {
185
- // No caboose
186
- ( "" . to_string ( ) , 0u32 )
187
- } ;
188
-
189
- println ! ( "Version: \" {version}\" " ) ;
190
- println ! ( "Epoch: {epoch}" ) ;
191
- }
192
168
Command :: ReplaceImage { image } => {
193
169
let contents = std:: fs:: read ( & image) . with_context ( || {
194
170
format ! ( "reading image file {}" , image. display( ) )
0 commit comments