Revert mac rdisk vs disk stuff as I'm not convinced it makes much difference.
authorCarl Hetherington <cth@carlh.net>
Wed, 29 Apr 2020 23:16:20 +0000 (01:16 +0200)
committerCarl Hetherington <cth@carlh.net>
Wed, 29 Apr 2020 23:16:20 +0000 (01:16 +0200)
src/lib/copy_to_drive_job.cc
src/lib/cross.h
src/lib/cross_linux.cc
src/lib/cross_osx.cc
src/lib/cross_windows.cc
src/tools/dcpomatic_disk_writer.cc

index 173d286f5f54a499ca65468a46916e13b2d3285a..7760c072fdd4b46cefcf23dcab796a6b328aa279 100644 (file)
@@ -65,8 +65,8 @@ CopyToDriveJob::json_name () const
 void
 CopyToDriveJob::run ()
 {
-       LOG_DISK("Sending write request to disk writer for %1 %2", _dcp.string(), _drive.device_for_write());
-       if (!_nanomsg.send(String::compose(DISK_WRITER_WRITE "\n%1\n%2\n", _dcp.string(), _drive.device_for_write()), 2000)) {
+       LOG_DISK("Sending write request to disk writer for %1 %2", _dcp.string(), _drive.device());
+       if (!_nanomsg.send(String::compose(DISK_WRITER_WRITE "\n%1\n%2\n", _dcp.string(), _drive.device()), 2000)) {
                throw CommunicationFailedError ();
        }
 
index d8296e21735923088c90a91e3b47c3b8db5d3ebd..1145812696ddbda442bae1ef16315f6001dc53c0 100644 (file)
@@ -117,8 +117,6 @@ public:
                return _device;
        }
 
-       std::string device_for_write () const;
-
        bool mounted () const {
                return !_mount_points.empty();
        }
index 983dbb669ea55bb0ac9ca6c066b63122f7ca8cd8..36683a0cd1cac9551a74935b32c4895b906ea99d 100644 (file)
@@ -344,13 +344,6 @@ Drive::unmount ()
 }
 
 
-string
-Drive::device_for_write () const
-{
-       return device ();
-}
-
-
 void
 unprivileged ()
 {
index 66be376d4cc7264d26d76a8a62a7bb406f207668..3b08c96849edc328b3808b361885d9ef035eb3f8 100644 (file)
@@ -494,15 +494,6 @@ Drive::get ()
 }
 
 
-string
-Drive::device_for_write () const
-{
-       string w = _device;
-       boost::replace_all (w, "/dev/disk", "/dev/rdisk");
-       return w;
-}
-
-
 boost::filesystem::path
 config_path ()
 {
index 96c69d78086a029e3b848394b8e7e21b0dd6cc1b..8ccc790d6c287e4a1b6592fe00724671b87f6c64 100644 (file)
@@ -596,13 +596,6 @@ Drive::unmount ()
 }
 
 
-string
-Drive::device_for_write () const
-{
-       return device ();
-}
-
-
 boost::filesystem::path
 config_path ()
 {
index b8255468f78ab827a86d965e7ab358dfd4f63f40..3fabe3e28f8a90bb0b216351d490e8ace4650416 100644 (file)
@@ -463,7 +463,7 @@ try
                bool on_drive_list = false;
                bool mounted = false;
                for (auto const& i: Drive::get()) {
-                       if (i.device_for_write() == *device) {
+                       if (i.device() == *device) {
                                on_drive_list = true;
                                mounted = i.mounted();
                        }