diff options
author | Brian Chen <brianc118@meta.com> | 2023-12-06 13:58:04 -0800 |
---|---|---|
committer | Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> | 2023-12-06 13:58:04 -0800 |
commit | 03879ad81d10c3bf4848090e1e9e4b001b15f7ea (patch) | |
tree | 5a3e25e63fa0d467674e117817939d309b5d4562 | |
parent | 3a855015d5a96dfa0711e540eb907db03b022703 (diff) |
ethtool: use libc::c_char instead of i8 (#8214)
Summary: Pull Request resolved: https://github.com/facebookincubator/below/pull/8214
Reviewed By: dschatzberg
Differential Revision: D51910582
fbshipit-source-id: c19dd467d753671fe42b5a3542c29069e23dc321
-rw-r--r-- | below/ethtool/src/reader.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/below/ethtool/src/reader.rs b/below/ethtool/src/reader.rs index b21464aa..b85391c2 100644 --- a/below/ethtool/src/reader.rs +++ b/below/ethtool/src/reader.rs @@ -18,14 +18,14 @@ use crate::errors::EthtoolError; use crate::ethtool_sys; const ETH_GSTATS_LEN: usize = 8; -fn if_name_bytes(if_name: &str) -> [i8; libc::IF_NAMESIZE] { +fn if_name_bytes(if_name: &str) -> [libc::c_char; libc::IF_NAMESIZE] { let mut it = if_name.as_bytes().iter().copied(); [0; libc::IF_NAMESIZE].map(|_| it.next().unwrap_or(0) as libc::c_char) } fn ioctl( fd: &OwnedFd, - if_name: [i8; libc::IF_NAMESIZE], + if_name: [libc::c_char; libc::IF_NAMESIZE], data: *mut libc::c_char, ) -> Result<(), Errno> { let ifr = libc::ifreq { @@ -256,7 +256,7 @@ pub trait EthtoolReadable { pub struct Ethtool { sock_fd: OwnedFd, - if_name: [i8; libc::IF_NAMESIZE], + if_name: [libc::c_char; libc::IF_NAMESIZE], } impl Ethtool { |