Skip to content

Commit

Permalink
merge ruxos dev
Browse files Browse the repository at this point in the history
  • Loading branch information
lhw2002426 committed Dec 19, 2023
1 parent 5fdc8c6 commit 2310893
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
28 changes: 28 additions & 0 deletions ulib/ruxlibc/c/pwd.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <semaphore.h>

static struct passwd pw__ = {
.pw_name = RUX_DEFAULT_USER,
Expand All @@ -29,13 +30,26 @@ int getpwnam_r(const char *name, struct passwd *pw, char *buf, size_t size, stru
unimplemented();
return 0;
}
// TODO
int sem_destroy(sem_t *sem)
{
unimplemented();
return 0;
}

int getpwuid_r(uid_t uid, struct passwd *pw, char *buf, size_t size, struct passwd **res)
{
unimplemented();
return 0;
}

// TODO
int sem_init(sem_t *sem, int pshared, unsigned int value)
{
unimplemented();
return 0;
}

struct passwd *getpwnam(const char *name)
{
struct passwd *pwd;
Expand All @@ -49,3 +63,17 @@ struct passwd *getpwnam(const char *name)

return pwd;
}

// TODO
int sem_post(sem_t *sem)
{
unimplemented();
return 0;
}

// TODO
int sem_wait(sem_t *sem)
{
unimplemented();
return 0;
}
5 changes: 5 additions & 0 deletions ulib/ruxlibc/c/resource.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,8 @@ int setpriority(int which, id_t who, int prio)
unimplemented();
return 0;
}

ssize_t sendfile(int out_fd, int in_fd, off_t *offset, size_t count){
unimplemented();
return 0;
}
7 changes: 7 additions & 0 deletions ulib/ruxmusl/src/syscall/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ pub fn syscall(syscall_id: SyscallId, args: [usize; 6]) -> isize {
args[2] as c_int,
) as _,
#[cfg(feature = "fs")]
<<<<<<< HEAD
SyscallId::FCHOWNAT => ruxos_posix_api::sys_fchownat(
args[0] as c_int,
args[1] as *const core::ffi::c_char,
Expand All @@ -65,6 +66,8 @@ pub fn syscall(syscall_id: SyscallId, args: [usize; 6]) -> isize {
args[4] as c_int,
) as _,
#[cfg(feature = "fs")]
=======
>>>>>>> upstream/dev
SyscallId::RENAMEAT => ruxos_posix_api::sys_renameat(
args[0] as c_int,
args[1] as *const core::ffi::c_char,
Expand Down Expand Up @@ -201,7 +204,11 @@ pub fn syscall(syscall_id: SyscallId, args: [usize; 6]) -> isize {
SyscallId::UMASK => ruxos_posix_api::sys_umask(args[0] as ctypes::mode_t) as _,
#[cfg(feature = "multitask")]
SyscallId::GETPID => ruxos_posix_api::sys_getpid() as _,
<<<<<<< HEAD
SyscallId::GETEUID => ruxos_posix_api::sys_geteuid() as _,
=======

>>>>>>> upstream/dev
SyscallId::SYSINFO => {
ruxos_posix_api::sys_sysinfo(args[0] as *mut ctypes::sysinfo) as _
}
Expand Down

0 comments on commit 2310893

Please sign in to comment.