agent/random: Rename RNDRESEEDRNG to RNDRESEEDCRNG

Make this definition match the one in kernel:

5bfc75d92e/include/uapi/linux/random.h (L38-L39)

Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
This commit is contained in:
Eduardo Lima (Etrunko) 2022-03-18 10:21:48 -03:00
parent bc3f63bf0a
commit d8f39fb269

View File

@ -13,7 +13,7 @@ use tracing::instrument;
pub const RNGDEV: &str = "/dev/random"; pub const RNGDEV: &str = "/dev/random";
pub const RNDADDTOENTCNT: libc::c_int = 0x40045201; pub const RNDADDTOENTCNT: libc::c_int = 0x40045201;
pub const RNDRESEEDRNG: libc::c_int = 0x5207; pub const RNDRESEEDCRNG: libc::c_int = 0x5207;
// Handle the differing ioctl(2) request types for different targets // Handle the differing ioctl(2) request types for different targets
#[cfg(target_env = "musl")] #[cfg(target_env = "musl")]
@ -41,7 +41,7 @@ pub fn reseed_rng(data: &[u8]) -> Result<()> {
}; };
Errno::result(ret).map(drop)?; Errno::result(ret).map(drop)?;
let ret = unsafe { libc::ioctl(f.as_raw_fd(), RNDRESEEDRNG as IoctlRequestType, 0) }; let ret = unsafe { libc::ioctl(f.as_raw_fd(), RNDRESEEDCRNG as IoctlRequestType, 0) };
Errno::result(ret).map(drop)?; Errno::result(ret).map(drop)?;
Ok(()) Ok(())