diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-04-06 00:36:09 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-04-06 00:36:09 +0200 |
| commit | 3f5a630daf748a9ce83b5577dea4dd67cd6a9494 (patch) | |
| tree | ed59ebd4331555b710651873e268eaef5510fb1d | |
| parent | d8c860b2b0e650ed8daebc15a8e7d2414959b8c6 (diff) | |
| parent | 40821cbef30c24a068b1654b64db1a1e33cea704 (diff) | |
Merge branch 'dist' of git://git.carlh.net/git/dcpomatic into dist
| -rw-r--r-- | src/lib/copy_to_drive_job.cc | 2 | ||||
| -rw-r--r-- | src/lib/file_log.cc | 6 | ||||
| -rw-r--r-- | src/lib/file_log.h | 1 | ||||
| -rw-r--r-- | src/tools/dcpomatic_disk_writer.cc | 4 |
4 files changed, 10 insertions, 3 deletions
diff --git a/src/lib/copy_to_drive_job.cc b/src/lib/copy_to_drive_job.cc index f7a5dfd11..b7bb5a60d 100644 --- a/src/lib/copy_to_drive_job.cc +++ b/src/lib/copy_to_drive_job.cc @@ -67,8 +67,8 @@ CopyToDriveJob::run () throw CopyError ("Could not communicate with writer process", 0); } + bool formatting = false; while (true) { - bool formatting = false; string s = _nanomsg.blocking_get (); if (s == DISK_WRITER_OK) { set_state (FINISHED_OK); diff --git a/src/lib/file_log.cc b/src/lib/file_log.cc index 197a22fcd..b9aa84c3d 100644 --- a/src/lib/file_log.cc +++ b/src/lib/file_log.cc @@ -37,6 +37,12 @@ FileLog::FileLog (boost::filesystem::path file) set_types (Config::instance()->log_types()); } +FileLog::FileLog (boost::filesystem::path file, int types) + : _file (file) +{ + set_types (types); +} + void FileLog::do_log (shared_ptr<const LogEntry> entry) { diff --git a/src/lib/file_log.h b/src/lib/file_log.h index 53fbe4f76..613dd0939 100644 --- a/src/lib/file_log.h +++ b/src/lib/file_log.h @@ -24,6 +24,7 @@ class FileLog : public Log { public: explicit FileLog (boost::filesystem::path file); + FileLog (boost::filesystem::path file, int types); std::string head_and_tail (int amount = 1024) const; diff --git a/src/tools/dcpomatic_disk_writer.cc b/src/tools/dcpomatic_disk_writer.cc index a896cd181..128391d60 100644 --- a/src/tools/dcpomatic_disk_writer.cc +++ b/src/tools/dcpomatic_disk_writer.cc @@ -348,6 +348,7 @@ try throw CopyError ("Failed to unmount device", r); } + ext4_device_unregister("ext4_fs"); nanomsg->blocking_send(DISK_WRITER_OK "\n"); } catch (CopyError& e) { LOG_DISK("CopyError: %1 %2", e.message(), e.number()); @@ -433,8 +434,7 @@ main () /* XXX: this is a hack, but I expect we'll need logs and I'm not sure if there's * a better place to put them. */ - dcpomatic_log.reset(new FileLog(config_path() / "disk_writer.log")); - dcpomatic_log->set_types (dcpomatic_log->types() | LogEntry::TYPE_DISK); + dcpomatic_log.reset(new FileLog(config_path() / "disk_writer.log", LogEntry::TYPE_DISK)); LOG_DISK_NC("dcpomatic_disk_writer started"); try { |
