File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -46,16 +46,25 @@ pub fn disable() {
46
46
/// cloud-hypervisor.
47
47
///
48
48
/// More info: <https://phip1611.de/blog/how-to-use-qemus-debugcon-feature/>
49
- #[ cfg( any( target_arch = "x86" , target_arch = "x86_64" ) ) ]
49
+ #[ cfg( all(
50
+ any( target_arch = "x86" , target_arch = "x86_64" ) ,
51
+ feature = "log-debugcon"
52
+ ) ) ]
50
53
#[ derive( Copy , Clone , Debug ) ]
51
54
struct DebugconWriter ;
52
55
53
- #[ cfg( any( target_arch = "x86" , target_arch = "x86_64" ) ) ]
56
+ #[ cfg( all(
57
+ any( target_arch = "x86" , target_arch = "x86_64" ) ,
58
+ feature = "log-debugcon"
59
+ ) ) ]
54
60
impl DebugconWriter {
55
61
const IO_PORT : u16 = 0xe9 ;
56
62
}
57
63
58
- #[ cfg( any( target_arch = "x86" , target_arch = "x86_64" ) ) ]
64
+ #[ cfg( all(
65
+ any( target_arch = "x86" , target_arch = "x86_64" ) ,
66
+ feature = "log-debugcon"
67
+ ) ) ]
59
68
impl core:: fmt:: Write for DebugconWriter {
60
69
fn write_str ( & mut self , s : & str ) -> fmt:: Result {
61
70
for & byte in s. as_bytes ( ) {
You can’t perform that action at this time.
0 commit comments