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 173d286..7760c07 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 d8296e2..1145812 100644 (file)
@@ -117,8 +117,6 @@ public:
                return _device;
        }
 
-       std::string device_for_write () const;
-
        bool mounted () const {
                return !_mount_points.empty();
        }
index 983dbb6..36683a0 100644 (file)
@@ -344,13 +344,6 @@ Drive::unmount ()
 }
 
 
-string
-Drive::device_for_write () const
-{
-       return device ();
-}
-
-
 void
 unprivileged ()
 {
index 66be376..3b08c96 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 96c69d7..8ccc790 100644 (file)
@@ -596,13 +596,6 @@ Drive::unmount ()
 }
 
 
-string
-Drive::device_for_write () const
-{
-       return device ();
-}
-
-
 boost::filesystem::path
 config_path ()
 {
index b825546..3fabe3e 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();
                        }