mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
rust/pv: Remove internal BinGuestSecret struct
The BinGuestSecret type provides no benefits. The public GuestSecret struct can handle everything. Therefore, move the two functions from bin to the non-bin variant. While at it, use a struct to define the binary structure instead of copy numbers to some positions in a Vec. This simplifies the addition of further secret types. Signed-off-by: Steffen Eiden <seiden@linux.ibm.com> Reviewed-by: Julian Ruess <julianr@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
c53dfa9754
commit
9eab43994b
@@ -291,10 +291,13 @@ pub enum ListableSecretType {
|
||||
/// Unknown secret type
|
||||
Unknown(u16),
|
||||
}
|
||||
|
||||
impl ListableSecretType {
|
||||
const RESERVED_0: u16 = 0x0000;
|
||||
const NULL: u16 = 0x0001;
|
||||
const ASSOCIATION: u16 = 0x0002;
|
||||
/// UV type id for a null secret
|
||||
pub const NULL: u16 = 0x0001;
|
||||
/// UV type id for an association secret
|
||||
pub const ASSOCIATION: u16 = 0x0002;
|
||||
}
|
||||
|
||||
impl Display for ListableSecretType {
|
||||
|
||||
Reference in New Issue
Block a user