+static int unmount_progress_func(enum wimlib_progress_msg msg,
+ const union wimlib_progress_info *info)
+{
+ if (msg == WIMLIB_PROGRESS_MSG_WRITE_STREAMS) {
+ struct msg_write_streams_progress msg = {
+ .hdr = {
+ .min_version = WIMLIB_MAKEVERSION(1, 2, 0),
+ .cur_version = WIMLIB_VERSION_CODE,
+ .msg_type = MSG_TYPE_WRITE_STREAMS_PROGRESS,
+ .msg_size = sizeof(msg),
+ },
+ .info = *info,
+ };
+ if (mq_send(wimfs_get_context()->daemon_to_unmount_mq,
+ (void*)&msg, sizeof(msg), 1))
+ {
+ ERROR_WITH_ERRNO("Failed to send progress information "
+ "to unmount process");
+ }
+ }
+ return 0;
+}
+