@@ -42,26 +42,22 @@ mod x86_64;
4242#[ cfg( target_arch = "aarch64" ) ]
4343mod aarch64;
4444
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:: * ;
4947
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:: * ;
5450
5551#[ derive( Debug , PartialEq ) ]
5652/// Kernel loader errors.
5753pub enum Error {
5854 /// Failed to load bzimage.
5955 #[ cfg( all( feature = "bzimage" , any( target_arch = "x86" , target_arch = "x86_64" ) ) ) ]
60- Bzimage ( BzImageError ) ,
56+ Bzimage ( bzimage :: Error ) ,
6157
6258 /// Failed to load elf image.
6359 #[ cfg( all( feature = "elf" , any( target_arch = "x86" , target_arch = "x86_64" ) ) ) ]
64- Elf ( ElfError ) ,
60+ Elf ( elf :: Error ) ,
6561
6662 /// Failed writing command line to guest memory.
6763 CommandLineCopy ,
@@ -99,15 +95,15 @@ impl Display for Error {
9995}
10096
10197#[ 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 {
104100 Error :: Elf ( err)
105101 }
106102}
107103
108104#[ 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 {
111107 Error :: Bzimage ( err)
112108 }
113109}
0 commit comments