瀏覽代碼

Add logging

Isaac Woods 7 年之前
父節點
當前提交
4fd47118f4
共有 4 個文件被更改,包括 23 次插入1 次删除
  1. 19 0
      Cargo.lock
  2. 1 0
      Cargo.toml
  3. 2 0
      src/lib.rs
  4. 1 1
      src/sdt.rs

+ 19 - 0
Cargo.lock

@@ -1,4 +1,23 @@
 [[package]]
 name = "acpi"
 version = "0.1.0"
+dependencies = [
+ "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
 
+[[package]]
+name = "cfg-if"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "log"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "cfg-if 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[metadata]
+"checksum cfg-if 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "405216fd8fe65f718daa7102ea808a946b6ce40c742998fbfd3463645552de18"
+"checksum log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "89f010e843f2b1a31dbd316b3b8d443758bc634bed37aabade59c686d644e0a2"

+ 1 - 0
Cargo.toml

@@ -8,3 +8,4 @@ readme = "README.md"
 license = "MIT/Apache-2.0"
 
 [dependencies]
+log = "0.*"

+ 2 - 0
src/lib.rs

@@ -3,6 +3,8 @@
 #[cfg(test)]
 extern crate std;
 
+#[macro_use] extern crate log;
+
 mod rsdp;
 mod sdt;
 #[cfg(test)] mod constructed_tables_test;

+ 1 - 1
src/sdt.rs

@@ -111,7 +111,7 @@ pub(crate) fn dispatch_sdt<H>(handler : &mut H, physical_address : usize) -> Res
                  * We don't recognise this signature. Early on, this probably just means we don't
                  * have support yet, but later on maybe this should become an actual error
                  */
-                // TODO: add warn!()
+                warn!("Unsupported SDT signature: {}. Skipping.", signature);
             },
         }
     }