From e7a53ec4e35b4089eb880596abe1cef740c84646 Mon Sep 17 00:00:00 2001 From: Thomas Schoebel-Theuer Date: Tue, 31 Jan 2017 08:58:02 +0100 Subject: [PATCH] server: propagate path from client --- kernel/mars_server.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/kernel/mars_server.c b/kernel/mars_server.c index 2fceade8..8bce9516 100644 --- a/kernel/mars_server.c +++ b/kernel/mars_server.c @@ -444,11 +444,16 @@ int handler_thread(void *data) } case CMD_GETENTS: { - status = -EINVAL; - if (unlikely(!cmd.cmd_str1)) - break; + char *path = cmd.cmd_str1 ? cmd.cmd_str1 : "/mars"; - status = mars_dent_work(&handler_global, "/mars", sizeof(struct mars_dent), main_checker, dummy_worker, &handler_global, 3); + status = mars_dent_work( + &handler_global, + path, + sizeof(struct mars_dent), + main_checker, + dummy_worker, + &handler_global, + 3); down(&brick->socket_sem); status = mars_send_dent_list(sock, &handler_global.dent_anchor);