- struct wimfs_context *wimfs_ctx;
-
- wimfs_ctx = wimfs_get_context();
-
- if (open_message_queues(wimfs_ctx, true))
- return;
-
- struct msg_handler_context handler_ctx = {
- .timeout_seconds = 5,
- .daemon = {
- .wimfs_ctx = wimfs_ctx,
- },
- };
-
- message_loop(wimfs_ctx->unmount_to_daemon_mq,
- &daemon_msg_handler_callbacks,
- &handler_ctx);
-
- close_message_queues(wimfs_ctx);
+ struct wimfs_context *wimfs_ctx = wimfs_get_context();
+ if (open_message_queues(wimfs_ctx, true) == 0) {
+ struct msg_handler_context handler_ctx = {
+ .timeout_seconds = 5,
+ .daemon = {
+ .wimfs_ctx = wimfs_ctx,
+ },
+ };
+ message_loop(wimfs_ctx->unmount_to_daemon_mq,
+ &daemon_msg_handler_callbacks,
+ &handler_ctx);
+ close_message_queues(wimfs_ctx);
+ }