diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-02-03 21:11:46 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-02-04 13:21:20 +0100 |
| commit | e0860839f664c6269261563d11be0495e756ff06 (patch) | |
| tree | 080257c5d9f1568c92542a4de8ee2ada983b9049 /src/lib/cross.h | |
| parent | b1231273ff0fbfd99e3d794f6d7ce5d9beed340b (diff) | |
Use a simpler way to decide what devices we could write to on macOS.
This basically involves the kDADiskDescriptionDeviceInternalKey,
kDADiskDescriptionMediaRemovableKey and kDADiskDescriptionMediaWritableKey
keys revealed by looking in
https://github.com/balena-io-modules/drivelist.git
Diffstat (limited to 'src/lib/cross.h')
| -rw-r--r-- | src/lib/cross.h | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/src/lib/cross.h b/src/lib/cross.h index 6904811b7..150199561 100644 --- a/src/lib/cross.h +++ b/src/lib/cross.h @@ -138,29 +138,19 @@ private: void disk_write_finished (); -struct OSXMediaPath -{ - bool real; ///< true for a "real" disk, false for a synthesized APFS one - std::vector<std::string> parts; ///< parts of the media path after the : -}; - - struct OSXDisk { std::string device; boost::optional<std::string> vendor; boost::optional<std::string> model; - OSXMediaPath media_path; - bool whole; std::vector<boost::filesystem::path> mount_points; unsigned long size; + bool system; + bool writeable; + bool partition; }; -boost::optional<OSXMediaPath> analyse_osx_media_path (std::string path); -std::vector<Drive> osx_disks_to_drives (std::vector<OSXDisk> disks); - - class ArgFixer { public: |
