File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed
Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change 3535// Types
3636// ============================================================================
3737
38- /// The kinds of block device we support.
38+ /// The types of block device we support.
3939#[ repr( C ) ]
4040#[ derive( Clone , PartialEq , Eq , Debug ) ]
41- pub enum Kind {
41+ pub enum DeviceType {
4242 /// An *SD* Card
4343 SecureDigitalCard ,
4444 /// A Hard Drive
@@ -53,20 +53,23 @@ pub enum Kind {
5353#[ repr( C ) ]
5454#[ derive( Clone , PartialEq , Eq , Debug ) ]
5555pub struct DeviceInfo {
56+ /// Some human-readable name for this serial device (e.g. `SdCard0` or
57+ /// `CF1`)
58+ pub name : crate :: ApiString < ' static > ,
5659 /// The kind of block device this is.
57- kind : Kind ,
60+ pub device_type : DeviceType ,
5861 /// The size of an addressable block, in bytes.
59- block_size : u32 ,
62+ pub block_size : u32 ,
6063 /// The total number of addressable blocks.
61- num_blocks : u64 ,
64+ pub num_blocks : u64 ,
6265 /// Can this device be ejected?
63- ejectable : bool ,
66+ pub ejectable : bool ,
6467 /// Can this device be removed?
65- removable : bool ,
68+ pub removable : bool ,
6669 /// Does this have media in it right now?
67- media_present : bool ,
70+ pub media_present : bool ,
6871 /// Is this media read-only?
69- read_only : bool ,
72+ pub read_only : bool ,
7073}
7174
7275// ============================================================================
You can’t perform that action at this time.
0 commit comments