@@ -68,7 +68,7 @@ fn setup_pagetables() {
6868 pde. io_write_u64 ( i * 8 , ( 0xb000u64 + ( 0x1000u64 * i) ) | 0x03 ) ;
6969 }
7070
71- log ! ( "Page tables setup\n " ) ;
71+ log ! ( "Page tables setup" ) ;
7272}
7373
7474const VIRTIO_PCI_VENDOR_ID : u16 = 0x1af4 ;
@@ -77,11 +77,11 @@ const VIRTIO_PCI_BLOCK_DEVICE_ID: u16 = 0x1042;
7777fn boot_from_device ( device : & mut block:: VirtioBlockDevice ) -> bool {
7878 match device. init ( ) {
7979 Err ( _) => {
80- log ! ( "Error configuring block device\n " ) ;
80+ log ! ( "Error configuring block device" ) ;
8181 return false ;
8282 }
8383 Ok ( _) => log ! (
84- "Virtio block device configured. Capacity: {} sectors\n " ,
84+ "Virtio block device configured. Capacity: {} sectors" ,
8585 device. get_capacity( )
8686 ) ,
8787 }
@@ -90,20 +90,20 @@ fn boot_from_device(device: &mut block::VirtioBlockDevice) -> bool {
9090
9191 match part:: find_efi_partition ( device) {
9292 Ok ( ( start, end) ) => {
93- log ! ( "Found EFI partition\n " ) ;
93+ log ! ( "Found EFI partition" ) ;
9494 f = fat:: Filesystem :: new ( device, start, end) ;
9595 if f. init ( ) . is_err ( ) {
96- log ! ( "Failed to create filesystem\n " ) ;
96+ log ! ( "Failed to create filesystem" ) ;
9797 return false ;
9898 }
9999 }
100100 Err ( _) => {
101- log ! ( "Failed to find EFI partition\n " ) ;
101+ log ! ( "Failed to find EFI partition" ) ;
102102 return false ;
103103 }
104104 }
105105
106- log ! ( "Filesystem ready\n " ) ;
106+ log ! ( "Filesystem ready" ) ;
107107
108108 let jump_address;
109109
@@ -112,28 +112,28 @@ fn boot_from_device(device: &mut block::VirtioBlockDevice) -> bool {
112112 jump_address = addr;
113113 }
114114 Err ( _) => {
115- log ! ( "Error loading default entry. Using EFI boot.\n " ) ;
115+ log ! ( "Error loading default entry. Using EFI boot." ) ;
116116 match f. open ( "/EFI/BOOT/BOOTX64 EFI" ) {
117117 Ok ( mut file) => {
118- log ! ( "Found bootloader (BOOTX64.EFI)\n " ) ;
118+ log ! ( "Found bootloader (BOOTX64.EFI)" ) ;
119119 let mut l = pe:: Loader :: new ( & mut file) ;
120120 match l. load ( 0x20_0000 ) {
121121 Ok ( ( a, size) ) => {
122- log ! ( "Executable loaded\n " ) ;
122+ log ! ( "Executable loaded" ) ;
123123 efi:: efi_exec ( a, 0x20_0000 , size, & f, device) ;
124124 return true ;
125125 }
126126 Err ( e) => {
127127 match e {
128- pe:: Error :: FileError => log ! ( "File error\n " ) ,
129- pe:: Error :: InvalidExecutable => log ! ( "Invalid executable\n " ) ,
128+ pe:: Error :: FileError => log ! ( "File error" ) ,
129+ pe:: Error :: InvalidExecutable => log ! ( "Invalid executable" ) ,
130130 }
131131 return false ;
132132 }
133133 }
134134 }
135135 Err ( _) => {
136- log ! ( "Failed to find bootloader\n " ) ;
136+ log ! ( "Failed to find bootloader" ) ;
137137 return false ;
138138 }
139139 }
@@ -142,7 +142,7 @@ fn boot_from_device(device: &mut block::VirtioBlockDevice) -> bool {
142142
143143 device. reset ( ) ;
144144
145- log ! ( "Jumping to kernel\n " ) ;
145+ log ! ( "Jumping to kernel" ) ;
146146
147147 // Rely on x86 C calling convention where second argument is put into %rsi register
148148 let ptr = jump_address as * const ( ) ;
@@ -157,7 +157,7 @@ pub extern "C" fn _start() -> ! {
157157 asm ! ( "movq $$0x180000, %rsp" ) ;
158158 }
159159
160- log ! ( "Starting..\n " ) ;
160+ log ! ( "Starting.." ) ;
161161
162162 enable_sse2 ( ) ;
163163 setup_pagetables ( ) ;
0 commit comments