@@ -42,26 +42,22 @@ mod x86_64;
42
42
#[ cfg( target_arch = "aarch64" ) ]
43
43
mod aarch64;
44
44
45
- #[ cfg( all( feature = "bzimage" , any( target_arch = "x86" , target_arch = "x86_64" ) ) ) ]
46
- pub use x86_64:: bzimage:: BzImage ;
47
- #[ cfg( all( feature = "bzimage" , any( target_arch = "x86" , target_arch = "x86_64" ) ) ) ]
48
- pub use x86_64:: bzimage:: Error as BzImageError ;
45
+ #[ cfg( any( target_arch = "x86" , target_arch = "x86_64" ) ) ]
46
+ pub use x86_64:: * ;
49
47
50
- #[ cfg( all( feature = "elf" , any( target_arch = "x86" , target_arch = "x86_64" ) ) ) ]
51
- pub use x86_64:: elf:: Elf ;
52
- #[ cfg( all( feature = "elf" , any( target_arch = "x86" , target_arch = "x86_64" ) ) ) ]
53
- pub use x86_64:: elf:: Error as ElfError ;
48
+ #[ cfg( target_arch = "aarch64" ) ]
49
+ pub use aarch64:: * ;
54
50
55
51
#[ derive( Debug , PartialEq ) ]
56
52
/// Kernel loader errors.
57
53
pub enum Error {
58
54
/// Failed to load bzimage.
59
55
#[ cfg( all( feature = "bzimage" , any( target_arch = "x86" , target_arch = "x86_64" ) ) ) ]
60
- Bzimage ( BzImageError ) ,
56
+ Bzimage ( bzimage :: Error ) ,
61
57
62
58
/// Failed to load elf image.
63
59
#[ cfg( all( feature = "elf" , any( target_arch = "x86" , target_arch = "x86_64" ) ) ) ]
64
- Elf ( ElfError ) ,
60
+ Elf ( elf :: Error ) ,
65
61
66
62
/// Failed writing command line to guest memory.
67
63
CommandLineCopy ,
@@ -99,15 +95,15 @@ impl Display for Error {
99
95
}
100
96
101
97
#[ cfg( all( feature = "elf" , any( target_arch = "x86" , target_arch = "x86_64" ) ) ) ]
102
- impl From < ElfError > for Error {
103
- fn from ( err : ElfError ) -> Self {
98
+ impl From < elf :: Error > for Error {
99
+ fn from ( err : elf :: Error ) -> Self {
104
100
Error :: Elf ( err)
105
101
}
106
102
}
107
103
108
104
#[ cfg( all( feature = "bzimage" , any( target_arch = "x86" , target_arch = "x86_64" ) ) ) ]
109
- impl From < BzImageError > for Error {
110
- fn from ( err : BzImageError ) -> Self {
105
+ impl From < bzimage :: Error > for Error {
106
+ fn from ( err : bzimage :: Error ) -> Self {
111
107
Error :: Bzimage ( err)
112
108
}
113
109
}
0 commit comments