[fuchsia-zircon] Create Rust wrappers for zx_debuglog_* syscalls
And use them in places where we make such syscalls directly with unsafe Rust today. (Plus add in missing test coverage for logger that covers the modified code.) The zx_debuglog_read wrapper currently returns a plain Vec of bytes and the caller needs to parse it according to the definition of zx_log_record_t. In the future it ideally would return an already-parsed Rust struct type, but there is some uncertainty around the existing debuglog syscalls so this wasn't done yet. Change-Id: Ibf3ddc6195a751dbacb6e0e9d24250370e8516e9
Showing
- garnet/bin/logger/src/klogger.rs 34 additions, 54 deletionsgarnet/bin/logger/src/klogger.rs
- garnet/bin/logger/tests/rust/BUILD.gn 1 addition, 0 deletionsgarnet/bin/logger/tests/rust/BUILD.gn
- garnet/bin/logger/tests/rust/src/main.rs 30 additions, 2 deletionsgarnet/bin/logger/tests/rust/src/main.rs
- garnet/public/rust/fuchsia-zircon/fuchsia-zircon-sys/src/lib.rs 6 additions, 0 deletions.../public/rust/fuchsia-zircon/fuchsia-zircon-sys/src/lib.rs
- garnet/public/rust/fuchsia-zircon/src/debuglog.rs 152 additions, 0 deletionsgarnet/public/rust/fuchsia-zircon/src/debuglog.rs
- garnet/public/rust/fuchsia-zircon/src/lib.rs 2 additions, 2 deletionsgarnet/public/rust/fuchsia-zircon/src/lib.rs
- src/sys/component_manager/src/klog.rs 33 additions, 58 deletionssrc/sys/component_manager/src/klog.rs
Loading
Please register or sign in to comment