diff options
-rw-r--r-- | Cargo.lock | 1 | ||||
-rw-r--r-- | arch/Cargo.toml | 1 | ||||
-rw-r--r-- | arch/src/fdt.rs | 9 |
3 files changed, 2 insertions, 9 deletions
diff --git a/Cargo.lock b/Cargo.lock index 8387f0e..60befe6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -22,7 +22,6 @@ dependencies = [ name = "arch" version = "0.1.0" dependencies = [ - "byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "devices 0.1.0", "io_jail 0.1.0", "kernel_cmdline 0.1.0", diff --git a/arch/Cargo.toml b/arch/Cargo.toml index f562fca..bf28560 100644 --- a/arch/Cargo.toml +++ b/arch/Cargo.toml @@ -5,7 +5,6 @@ authors = ["The Chromium OS Authors"] edition = "2018" [dependencies] -byteorder = "*" devices = { path = "../devices" } io_jail = { path = "../io_jail" } kernel_cmdline = { path = "../kernel_cmdline" } diff --git a/arch/src/fdt.rs b/arch/src/fdt.rs index 71c791d..a3861d5 100644 --- a/arch/src/fdt.rs +++ b/arch/src/fdt.rs @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -use byteorder::{BigEndian, ByteOrder}; use libc::{c_char, c_int, c_void}; use std::ffi::{CStr, CString}; use std::fmt::{self, Display}; @@ -106,15 +105,11 @@ pub fn property(fdt: &mut Vec<u8>, name: &str, val: &[u8]) -> Result<()> { } fn cpu_to_fdt32(input: u32) -> [u8; 4] { - let mut buf = [0; 4]; - BigEndian::write_u32(&mut buf, input); - buf + input.to_be_bytes() } fn cpu_to_fdt64(input: u64) -> [u8; 8] { - let mut buf = [0; 8]; - BigEndian::write_u64(&mut buf, input); - buf + input.to_be_bytes() } pub fn property_u32(fdt: &mut Vec<u8>, name: &str, val: u32) -> Result<()> { |