1.1 --- a/server/src/main.cc Sat Jun 29 22:32:04 2019 +0200
1.2 +++ b/server/src/main.cc Sun Jun 30 00:43:24 2019 +0200
1.3 @@ -157,9 +157,8 @@
1.4
1.5 void mount(ipc_message_t *msg)
1.6 {
1.7 + fs_object_t fsobj;
1.8 l4_cap_idx_t server;
1.9 - l4re_ds_t ds;
1.10 - char *buffer;
1.11 long err;
1.12
1.13 /* Obtain the filesystem capability. */
1.14 @@ -173,7 +172,7 @@
1.15
1.16 /* Obtain the dataspace. */
1.17
1.18 - err = ipc_message_import_dataspace(msg, 1, &ds, (l4_addr_t *) &buffer);
1.19 + err = fsdesc_import_dataspace(msg, 1, &fsobj);
1.20 if (err)
1.21 {
1.22 ipc_message_send_error(msg, -L4_EIO);
1.23 @@ -182,7 +181,13 @@
1.24
1.25 /* Obtain the object's path. */
1.26
1.27 - char *path = buffer;
1.28 + char *path = fsdesc_get_name(&fsobj);
1.29 +
1.30 + if (path == NULL)
1.31 + {
1.32 + ipc_message_send_error(msg, -L4_EINVAL);
1.33 + return;
1.34 + }
1.35
1.36 /* Mount the supplied capability. */
1.37
1.38 @@ -190,7 +195,7 @@
1.39
1.40 /* Free the capability and buffer from this task. */
1.41
1.42 - ipc_message_discard_dataspace(msg, ds, (l4_addr_t) buffer);
1.43 + fsdesc_deallocate_buffer(&fsobj);
1.44 }
1.45
1.46 /* Non-exported methods. */