Skip to content

Commit

Permalink
file: mount() function
Browse files Browse the repository at this point in the history
  • Loading branch information
jewelcodes committed Sep 11, 2024
1 parent 55c6b9e commit b2e4868
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,19 @@
#include <kernel/file.h>
#include <kernel/io.h>
#include <kernel/sched.h>
#include <kernel/servers.h>

int mount(Thread *t, uint64_t id, const char *src, const char *tgt, const char *type, int flags) {
/* stub */
return -1;
// send a request to lumen
MountCommand *command = calloc(1, sizeof(MountCommand));
if(!command) return -ENOMEM;

command->header.header.command = COMMAND_MOUNT;
command->header.header.length = sizeof(MountCommand);
command->header.id = id;
command->flags = flags;
strcpy(command->source, src);
strcpy(command->target, tgt);
strcpy(command->type, type);

}

0 comments on commit b2e4868

Please sign in to comment.