mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
rust/Cargo.lock: Update zerocopy crate
Update the zerocopy dependency from v0.6.* to the non forward compatible v0.7.*. Incompatible changes are the requirment of the FromZeroes trait for FromBytes trait and the non-default derive feature which this patches handles as well. Reviewed-by: Marc Hartmayer <mhartmay@linux.ibm.com> Signed-off-by: Steffen Eiden <seiden@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
c0a12b29d0
commit
c8e0992814
@@ -10,7 +10,7 @@ use std::{
|
||||
io::{Read, Write},
|
||||
path::Path,
|
||||
};
|
||||
use zerocopy::{AsBytes, BigEndian, FromBytes, U64};
|
||||
use zerocopy::{AsBytes, BigEndian, FromBytes, FromZeroes, U64};
|
||||
|
||||
/// Trait that describes bitflags, represented by `T`.
|
||||
pub trait Flags<T>: From<T> + for<'a> From<&'a T> {
|
||||
@@ -32,7 +32,7 @@ pub trait Flags<T>: From<T> + for<'a> From<&'a T> {
|
||||
///
|
||||
/// Wraps an u64 to set/get individual bits
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Clone, Copy, Default, AsBytes, FromBytes)]
|
||||
#[derive(Debug, Clone, Copy, Default, AsBytes, FromZeroes, FromBytes)]
|
||||
pub struct Msb0Flags64(U64<BigEndian>);
|
||||
impl Flags<u64> for Msb0Flags64 {
|
||||
#[track_caller]
|
||||
@@ -74,7 +74,7 @@ impl From<&u64> for Msb0Flags64 {
|
||||
///
|
||||
/// Wraps an u64 to set/get individual bits
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Clone, Copy, Default, AsBytes, FromBytes)]
|
||||
#[derive(Debug, Clone, Copy, Default, AsBytes, FromZeroes, FromBytes)]
|
||||
pub struct Lsb0Flags64(U64<BigEndian>);
|
||||
impl Flags<u64> for Lsb0Flags64 {
|
||||
#[track_caller]
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// Copyright IBM Corp. 2023
|
||||
|
||||
use crate::{assert_size, static_assert};
|
||||
use zerocopy::{AsBytes, FromBytes};
|
||||
use zerocopy::{AsBytes, FromBytes, FromZeroes};
|
||||
|
||||
pub const UVIO_ATT_ARCB_MAX_LEN: usize = 0x100000;
|
||||
pub const UVIO_ATT_MEASUREMENT_MAX_LEN: usize = 0x8000;
|
||||
@@ -55,7 +55,7 @@ assert_size!(uvio_ioctl_cb, 0x40);
|
||||
/// Note that bit 0 (UVIO_IOCTL_UVDEV_INFO_NR) is always zero for `supp_uv_cmds`
|
||||
/// as there is no corresponding UV-call.
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone, AsBytes, FromBytes)]
|
||||
#[derive(Debug, Copy, Clone, AsBytes, FromZeroes, FromBytes)]
|
||||
pub struct uvio_uvdev_info {
|
||||
pub supp_uvio_cmds: u64,
|
||||
pub supp_uv_cmds: u64,
|
||||
@@ -84,7 +84,7 @@ pub const UVIO_ATT_UID_LEN: usize = 0x10;
|
||||
/// UV will return invalid command rc.
|
||||
/// Obviously all numbers are in BIG-endian!
|
||||
#[repr(C)]
|
||||
#[derive(Debug, AsBytes, FromBytes)]
|
||||
#[derive(Debug, AsBytes, FromZeroes, FromBytes)]
|
||||
pub struct uvio_attest {
|
||||
pub arcb_addr: u64, //in
|
||||
pub meas_addr: u64, //out
|
||||
|
||||
@@ -9,7 +9,7 @@ use crate::{
|
||||
Result,
|
||||
};
|
||||
use std::fmt::Display;
|
||||
use zerocopy::{AsBytes, FromBytes};
|
||||
use zerocopy::{AsBytes, FromZeroes};
|
||||
|
||||
/// Information of supported functions by the uvdevice
|
||||
///
|
||||
|
||||
@@ -17,7 +17,7 @@ use std::{
|
||||
slice::Iter,
|
||||
vec::IntoIter,
|
||||
};
|
||||
use zerocopy::{AsBytes, FromBytes, U16, U32};
|
||||
use zerocopy::{AsBytes, FromBytes, FromZeroes, U16, U32};
|
||||
|
||||
/// _List Secrets_ Ultravisor command.
|
||||
///
|
||||
@@ -331,7 +331,7 @@ where
|
||||
|
||||
/// A secret in a [`SecretList`]
|
||||
#[repr(C)]
|
||||
#[derive(Debug, PartialEq, Eq, AsBytes, FromBytes, Serialize)]
|
||||
#[derive(Debug, PartialEq, Eq, AsBytes, FromZeroes, FromBytes, Serialize)]
|
||||
pub struct SecretEntry {
|
||||
#[serde(serialize_with = "ser_u16")]
|
||||
index: U16<BigEndian>,
|
||||
|
||||
Reference in New Issue
Block a user