devicemapper: Implement traits for Flags

For compatibility with the new version of libbitflags (2.2.1), derive
Flags struct from Copy, Clone, Debug, Eq, Hash, Ord, PartialEq,
PartialOrd.

Test: Build
Change-Id: Idbd3e776954e20e3ac58d28cf2a89f2ece16900e
Merged-In: Ia2372e77805a2bc57bdeaa7eba2f0653e0ee14a7
diff --git a/libs/devicemapper/src/loopdevice/sys.rs b/libs/devicemapper/src/loopdevice/sys.rs
index 98b5085..a35eaa9 100644
--- a/libs/devicemapper/src/loopdevice/sys.rs
+++ b/libs/devicemapper/src/loopdevice/sys.rs
@@ -61,6 +61,8 @@
 unsafe impl DataInit for loop_info64 {}
 
 bitflags! {
+    #[repr(transparent)]
+    #[derive(Copy, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
     pub struct Flag: u32 {
         const LO_FLAGS_READ_ONLY = 1 << 0;
         const LO_FLAGS_AUTOCLEAR = 1 << 2;
diff --git a/libs/devicemapper/src/sys.rs b/libs/devicemapper/src/sys.rs
index e709bf0..3cecde3 100644
--- a/libs/devicemapper/src/sys.rs
+++ b/libs/devicemapper/src/sys.rs
@@ -72,6 +72,8 @@
 pub const DM_MAX_TYPE_NAME: usize = 16;
 
 bitflags! {
+    #[repr(transparent)]
+    #[derive(Copy, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
     pub struct Flag: u32 {
         const DM_READONLY_FLAG = 1 << 0;
         const DM_SUSPEND_FLAG = 1 << 1;