Move OSXDisk out of common header.
authorCarl Hetherington <cth@carlh.net>
Fri, 3 Jan 2025 00:24:22 +0000 (01:24 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 6 Jan 2025 23:41:32 +0000 (00:41 +0100)
src/lib/cross.h
src/lib/cross_osx.cc

index 10b0b113f22940ff1081d67759f21bb31d547233..5518957545b3450fe95d9bc555ff08608aa3b25d 100644 (file)
@@ -129,6 +129,12 @@ public:
 
 private:
        std::string _device;
+       /** Descriptions of how this drive is mounted.  This is interpreted differently
+        *  on different platforms.
+        *
+        *  On macOS it's a list of device nodes e.g. /dev/disk8, /dev/disk8s2, /dev/disk7s5 or
+        *  filesystem mount points (the contents are not important, just if any exist).
+        */
        std::vector<boost::filesystem::path> _mount_points;
        /** size in bytes */
        uint64_t _size;
@@ -139,20 +145,6 @@ private:
 void disk_write_finished ();
 
 
-struct OSXDisk
-{
-       std::string bsd_name;
-       std::string device;
-       boost::optional<std::string> vendor;
-       boost::optional<std::string> model;
-       std::vector<boost::filesystem::path> mount_points;
-       unsigned long size;
-       bool system;
-       bool writeable;
-       bool partition;
-};
-
-
 class ArgFixer
 {
 public:
index ae5ec85c4d4c8e88ef475878c16bcde90cb81984..a8ac44240ef77bc7e92ce6c5f987a02ac19836be 100644 (file)
@@ -204,6 +204,20 @@ start_player ()
 }
 
 
+struct OSXDisk
+{
+       std::string bsd_name;
+       std::string device;
+       boost::optional<std::string> vendor;
+       boost::optional<std::string> model;
+       std::vector<boost::filesystem::path> mount_points;
+       unsigned long size;
+       bool system;
+       bool writeable;
+       bool partition;
+};
+
+
 static optional<string>
 get_vendor (CFDictionaryRef& description)
 {