};
struct msg_handler_context {
- bool is_daemon;
int timeout_seconds;
union {
struct {
int status = 0;
int ret;
int unmount_flags;
+ wimlib_progress_func_t progress_func;
DEBUG("Handling unmount request msg");
}
unmount_flags = msg->unmount_flags;
+ if (msg->want_progress_messages)
+ progress_func = unmount_progress_func;
+ else
+ progress_func = NULL;
ret = send_daemon_info_msg(wimfs_ctx->daemon_to_unmount_mq, getpid(),
wimfs_ctx->mount_flags);
if (unmount_flags & WIMLIB_UNMOUNT_FLAG_RECOMPRESS)
write_flags |= WIMLIB_WRITE_FLAG_RECOMPRESS;
status = rebuild_wim(wimfs_ctx, write_flags,
- unmount_progress_func);
+ progress_func);
}
} else {
DEBUG("Read-only mount");
return;
struct msg_handler_context handler_ctx = {
- .is_daemon = true,
.timeout_seconds = 5,
.daemon = {
.wimfs_ctx = wimfs_ctx,
goto out_close_message_queues;
struct msg_handler_context handler_ctx = {
- .is_daemon = false,
.timeout_seconds = 5,
.unmount = {
.daemon_pid = 0,