[v2,4/7] spfs: improve SPFS manager start debug and error output

Submitted by Stanislav Kinsburskiy on Dec. 21, 2017, 11:07 a.m.

Details

Message ID 20171221110713.1002189.94435.stgit@skinsbursky-vz7.qa.sw.ru
State New
Series "spfs: duplicate socket before sending it from usernsd"
Headers show

Commit Message

Stanislav Kinsburskiy Dec. 21, 2017, 11:07 a.m.
Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
---
 criu/spfs.c |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

Patch hide | download patch | download mbox

diff --git a/criu/spfs.c b/criu/spfs.c
index 223bf93..89fb9f9 100644
--- a/criu/spfs.c
+++ b/criu/spfs.c
@@ -127,6 +127,8 @@  static int start_spfs_manager(void)
 	char *socket_path = spfs_manager_socket_path();
 	int err = -ENOMEM, sock;
 
+	pr_info("Starting SPFS manager\n");
+
 	err = cr_system(-1, -1, -1, spfs_manager,
 			(char *[]){ "spfs-manager", "-vvvv",
 				 "-d",
@@ -135,13 +137,17 @@  static int start_spfs_manager(void)
 				 "--log-dir", spfs_manager_log_dir(),
 				 "--exit-with-spfs", NULL },
 			0);
-	pr_info("%s: spfs manager start result: %d\n", __func__, err);
-	if (err)
+	if (err) {
+		pr_err("failed to start SPFS manager binary: %d\n", err);
 		return err;
+	}
 
 	sock = sock_seqpacket_connect(socket_path);
-	if (sock < 0)
+	if (sock < 0) {
+		pr_err("failed to connect to SPFS manager via %s: %d\n",
+				socket_path, err);
 		return sock;
+	}
 
 	err = install_service_fd(SPFS_MNGR_SK, sock);
 	if (err < 0) {