Skip to content

Commit

Permalink
servers: added new commands for exec() and others
Browse files Browse the repository at this point in the history
  • Loading branch information
jewelcodes committed Sep 30, 2024
1 parent a5603f4 commit 0735e7c
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/include/kernel/servers.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,17 @@
#define COMMAND_IOCTL 0x8007
#define COMMAND_OPENDIR 0x8008
#define COMMAND_READDIR 0x8009
#define COMMAND_CHMOD 0x800A
#define COMMAND_CHOWN 0x800B
#define COMMAND_LINK 0x800C
#define COMMAND_MKDIR 0x800D
#define COMMAND_RMDIR 0x800E

#define MAX_SYSCALL_COMMAND 0x8009
#define COMMAND_EXEC 0x800F
#define COMMAND_CHDIR 0x8010
#define COMMAND_CHROOT 0x8011

#define MAX_SYSCALL_COMMAND 0x8011

/* these commands are for device drivers */
#define COMMAND_IRQ 0xC000
Expand Down Expand Up @@ -180,6 +189,14 @@ typedef struct {
char data[MAX_FILE_PATH];
} ReaddirCommand;

/* exec() */
typedef struct {
SyscallHeader header;
char path[MAX_FILE_PATH];

uint8_t elf[]; // ELF file
} ExecCommand;

void serverInit();
void serverIdle();
void handleGeneralRequest(int, const MessageHeader *, void *);
Expand Down

0 comments on commit 0735e7c

Please sign in to comment.