summaryrefslogtreecommitdiff
path: root/diskman/disk.hh
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2020-02-23 01:25:36 -0600
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2020-02-23 01:25:36 -0600
commit542a2d963018429e00c92f9fa1c7d1d852d641b1 (patch)
tree7f521cfc119a5347c2730ae63b28c0a374a9aefa /diskman/disk.hh
parent5575b3475bdbad44f5e05f1b7755859a14f9a84c (diff)
downloadhorizon-542a2d963018429e00c92f9fa1c7d1d852d641b1.tar.gz
horizon-542a2d963018429e00c92f9fa1c7d1d852d641b1.tar.bz2
horizon-542a2d963018429e00c92f9fa1c7d1d852d641b1.tar.xz
horizon-542a2d963018429e00c92f9fa1c7d1d852d641b1.zip
DiskMan: Allow sector size of disk to be retrieved
Diffstat (limited to 'diskman/disk.hh')
-rw-r--r--diskman/disk.hh5
1 files changed, 5 insertions, 0 deletions
diff --git a/diskman/disk.hh b/diskman/disk.hh
index 668f209..bad166f 100644
--- a/diskman/disk.hh
+++ b/diskman/disk.hh
@@ -77,6 +77,9 @@ public:
* disk, in mebibytes (MiB). */
uint32_t contiguous_block() const { return this->contiguous_mb; }
+ /*! Retrieve the sector size of the disk. */
+ uint32_t sector_size() const { return this->_sector; }
+
/*! Retrieve the partitions contained in the label, if any.
* @note You may only call this method if *has_label* is true. */
const std::vector<Partition> partitions() const;
@@ -117,6 +120,8 @@ private:
uint32_t free_mb;
/*! Largest contiguous block of free space on this disk, in mebibytes */
uint32_t contiguous_mb;
+ /*! Size of this disk's sectors, in bytes */
+ uint32_t _sector;
Disk(void *creation, int type, bool partition);
friend class DiskMan;