diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-03-08 23:37:10 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-03-12 23:28:27 +0100 |
| commit | 9c2a8318b03f8612f21f2086403eead80be1e1bb (patch) | |
| tree | f6d6cd7b357880b951b1597a15b2762c5389864b | |
| parent | 7981eefcfebb563ccf5627f132abdfdef22e0c23 (diff) | |
Use /dev/rdisk on macOS.
| -rw-r--r-- | src/tools/dcpomatic_disk_writer.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/tools/dcpomatic_disk_writer.cc b/src/tools/dcpomatic_disk_writer.cc index 6c4221d8a..f33c7974a 100644 --- a/src/tools/dcpomatic_disk_writer.cc +++ b/src/tools/dcpomatic_disk_writer.cc @@ -193,7 +193,7 @@ try LOG_DISK ("Here we go writing %1 to %2", *dcp_path, *device); -#ifdef DCPOMATIC_LINUX +#if defined(DCPOMATIC_LINUX) polkit_authority = polkit_authority_get_sync (0, 0); PolkitSubject* subject = polkit_unix_process_new_for_owner (getppid(), 0, -1); Parameters* parameters = new Parameters; @@ -209,12 +209,11 @@ try polkit_authority_check_authorization ( polkit_authority, subject, "com.dcpomatic.write-drive", 0, POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION, 0, polkit_callback, parameters ); -#else - string posix_partition = ""; -#ifdef DCPOMATIC_OSX - posix_partition = *device + "s1"; -#endif - dcpomatic::write (*dcp_path, *device, posix_partition, nanomsg); +#elif defined(DCPOMATIC_OSX) + string fast_device = boost::algorithm::replace_first_copy (*device, "/dev/disk", "/dev/rdisk"); + dcpomatic::write (*dcp_path, fast_device, fast_device + "s1", nanomsg); +#elif defined(DCPOMATIC_WINDOWS) + dcpomatic::write (*dcp_path, *device, "", nanomsg); #endif } |
