summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-12-29 23:38:39 +0100
committerCarl Hetherington <cth@carlh.net>2023-02-05 20:08:52 +0100
commit8c867a69d4a93cf81b89a612764eb0be902b7407 (patch)
tree32d6094dbb48322333799cd7451d7ae660a3ac2d /src/tools
parentef962e75de1ba175579080d6ac1c440b2edd5fa0 (diff)
Recover better errors from ext4.
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/dcpomatic_disk_writer.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/tools/dcpomatic_disk_writer.cc b/src/tools/dcpomatic_disk_writer.cc
index 5a10d75cb..3535ffa1c 100644
--- a/src/tools/dcpomatic_disk_writer.cc
+++ b/src/tools/dcpomatic_disk_writer.cc
@@ -181,7 +181,7 @@ try
if (success) {
sent_reply = DiskWriterBackEndResponse::ok().write_to_nanomsg(*nanomsg, LONG_TIMEOUT);
} else {
- sent_reply = DiskWriterBackEndResponse::error("Could not unmount drive", 1).write_to_nanomsg(*nanomsg, LONG_TIMEOUT);
+ sent_reply = DiskWriterBackEndResponse::error("Could not unmount drive", 1, 0).write_to_nanomsg(*nanomsg, LONG_TIMEOUT);
}
if (!sent_reply) {
LOG_DISK_NC("CommunicationFailedError in unmount_finished");
@@ -189,7 +189,7 @@ try
}
},
[]() {
- if (!DiskWriterBackEndResponse::error("Could not get permission to unmount drive", 1).write_to_nanomsg(*nanomsg, LONG_TIMEOUT)) {
+ if (!DiskWriterBackEndResponse::error("Could not get permission to unmount drive", 1, 0).write_to_nanomsg(*nanomsg, LONG_TIMEOUT)) {
LOG_DISK_NC("CommunicationFailedError in unmount_finished");
throw CommunicationFailedError ();
}
@@ -221,21 +221,21 @@ try
#ifdef DCPOMATIC_OSX
if (!starts_with(device, "/dev/disk")) {
LOG_DISK ("Will not write to %1", device);
- DiskWriterBackEndResponse::error("Refusing to write to this drive", 1).write_to_nanomsg(*nanomsg, LONG_TIMEOUT);
+ DiskWriterBackEndResponse::error("Refusing to write to this drive", 1, 0).write_to_nanomsg(*nanomsg, LONG_TIMEOUT);
return true;
}
#endif
#ifdef DCPOMATIC_LINUX
if (!starts_with(device, "/dev/sd") && !starts_with(device, "/dev/hd")) {
LOG_DISK ("Will not write to %1", device);
- DiskWriterBackEndResponse::error("Refusing to write to this drive", 1).write_to_nanomsg(*nanomsg, LONG_TIMEOUT);
+ DiskWriterBackEndResponse::error("Refusing to write to this drive", 1, 0).write_to_nanomsg(*nanomsg, LONG_TIMEOUT);
return true;
}
#endif
#ifdef DCPOMATIC_WINDOWS
if (!starts_with(device, "\\\\.\\PHYSICALDRIVE")) {
LOG_DISK ("Will not write to %1", device);
- DiskWriterBackEndResponse::error("Refusing to write to this drive", 1).write_to_nanomsg(*nanomsg, LONG_TIMEOUT);
+ DiskWriterBackEndResponse::error("Refusing to write to this drive", 1, 0).write_to_nanomsg(*nanomsg, LONG_TIMEOUT);
return true;
}
#endif
@@ -251,12 +251,12 @@ try
if (!on_drive_list) {
LOG_DISK ("Will not write to %1 as it's not recognised as a drive", device);
- DiskWriterBackEndResponse::error("Refusing to write to this drive", 1).write_to_nanomsg(*nanomsg, LONG_TIMEOUT);
+ DiskWriterBackEndResponse::error("Refusing to write to this drive", 1, 0).write_to_nanomsg(*nanomsg, LONG_TIMEOUT);
return true;
}
if (mounted) {
LOG_DISK ("Will not write to %1 as it's mounted", device);
- DiskWriterBackEndResponse::error("Refusing to write to this drive", 1).write_to_nanomsg(*nanomsg, LONG_TIMEOUT);
+ DiskWriterBackEndResponse::error("Refusing to write to this drive", 1, 0).write_to_nanomsg(*nanomsg, LONG_TIMEOUT);
return true;
}
@@ -286,7 +286,7 @@ try
},
[]() {
if (nanomsg) {
- DiskWriterBackEndResponse::error("Could not obtain authorization to write to the drive", 1).write_to_nanomsg(*nanomsg, LONG_TIMEOUT);
+ DiskWriterBackEndResponse::error("Could not obtain authorization to write to the drive", 1, 0).write_to_nanomsg(*nanomsg, LONG_TIMEOUT);
}
});
}