From: Carl Hetherington Date: Wed, 29 Apr 2020 23:16:20 +0000 (+0200) Subject: Revert mac rdisk vs disk stuff as I'm not convinced it makes much difference. X-Git-Tag: v2.15.67~2 X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=56caa542a558a3e261a3da4773c9ed3e66e262ab Revert mac rdisk vs disk stuff as I'm not convinced it makes much difference. --- diff --git a/src/lib/copy_to_drive_job.cc b/src/lib/copy_to_drive_job.cc index 173d286f5..7760c072f 100644 --- a/src/lib/copy_to_drive_job.cc +++ b/src/lib/copy_to_drive_job.cc @@ -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 (); } diff --git a/src/lib/cross.h b/src/lib/cross.h index d8296e217..114581269 100644 --- a/src/lib/cross.h +++ b/src/lib/cross.h @@ -117,8 +117,6 @@ public: return _device; } - std::string device_for_write () const; - bool mounted () const { return !_mount_points.empty(); } diff --git a/src/lib/cross_linux.cc b/src/lib/cross_linux.cc index 983dbb669..36683a0cd 100644 --- a/src/lib/cross_linux.cc +++ b/src/lib/cross_linux.cc @@ -344,13 +344,6 @@ Drive::unmount () } -string -Drive::device_for_write () const -{ - return device (); -} - - void unprivileged () { diff --git a/src/lib/cross_osx.cc b/src/lib/cross_osx.cc index 66be376d4..3b08c9684 100644 --- a/src/lib/cross_osx.cc +++ b/src/lib/cross_osx.cc @@ -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 () { diff --git a/src/lib/cross_windows.cc b/src/lib/cross_windows.cc index 96c69d780..8ccc790d6 100644 --- a/src/lib/cross_windows.cc +++ b/src/lib/cross_windows.cc @@ -596,13 +596,6 @@ Drive::unmount () } -string -Drive::device_for_write () const -{ - return device (); -} - - boost::filesystem::path config_path () { diff --git a/src/tools/dcpomatic_disk_writer.cc b/src/tools/dcpomatic_disk_writer.cc index b8255468f..3fabe3e28 100644 --- a/src/tools/dcpomatic_disk_writer.cc +++ b/src/tools/dcpomatic_disk_writer.cc @@ -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(); }