Skip to content

Commit

Permalink
Add non-trivial access function to UEFI.
Browse files Browse the repository at this point in the history
  • Loading branch information
stikonas committed Jan 5, 2024
1 parent 326243b commit c103ee8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions uefi/unistd.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,16 @@ char* strncpy(char* dest, char const* src, size_t count);
char* strncat(char* dest, char const* src, size_t count);
void* memcpy(void* dest, void const* src, size_t count);

int open(char* name, int flag, int mode);
int close(int fd);
int access(char* pathname, int mode)
{
int fd = open(pathname, 0, 0);
if (fd == -1)
{
return -1;
}
close(fd);
return 0;
}

Expand Down

0 comments on commit c103ee8

Please sign in to comment.