mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-28 15:34:33 +00:00
Add stub F_DUPFD_CLOEXEC and add more cases in linux_fcntl
This commit is contained in:
parent
a09dfe274a
commit
e3f2912d59
@ -131,6 +131,15 @@
|
|||||||
|
|
||||||
#define F_SETOWN_EX 15
|
#define F_SETOWN_EX 15
|
||||||
#define F_GETOWN_EX 16
|
#define F_GETOWN_EX 16
|
||||||
|
#define F_GETOWNER_UIDS 17
|
||||||
|
|
||||||
|
#define F_OFD_GETLK 36
|
||||||
|
#define F_OFD_SETLK 37
|
||||||
|
#define F_OFD_SETLKW 38
|
||||||
|
|
||||||
|
#define F_DUPFD_CLOEXEC 1030
|
||||||
|
|
||||||
|
#define FD_CLOEXEC 1
|
||||||
|
|
||||||
#define DT_UNKNOWN 0
|
#define DT_UNKNOWN 0
|
||||||
#define DT_FIFO 1
|
#define DT_FIFO 1
|
||||||
@ -188,6 +197,12 @@ typedef unsigned long timeu64_t;
|
|||||||
typedef int clockid_t;
|
typedef int clockid_t;
|
||||||
typedef long time64_t;
|
typedef long time64_t;
|
||||||
|
|
||||||
|
struct f_owner_ex
|
||||||
|
{
|
||||||
|
int type;
|
||||||
|
pid_t pid;
|
||||||
|
};
|
||||||
|
|
||||||
struct iovec
|
struct iovec
|
||||||
{
|
{
|
||||||
void *iov_base;
|
void *iov_base;
|
||||||
|
@ -1797,6 +1797,14 @@ static int linux_fcntl(SysFrm *, int fd, int cmd, void *arg)
|
|||||||
fdt->SetFlags(fd, fdt->GetFlags(fd) & ~O_APPEND);
|
fdt->SetFlags(fd, fdt->GetFlags(fd) & ~O_APPEND);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
case F_DUPFD_CLOEXEC:
|
||||||
|
{
|
||||||
|
int ret = fdt->_dup2(fd, s_cst(int, (uintptr_t)arg));
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
|
fdt->GetDescriptor(ret).Flags |= FD_CLOEXEC;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
case F_SETOWN:
|
case F_SETOWN:
|
||||||
case F_GETOWN:
|
case F_GETOWN:
|
||||||
case F_SETSIG:
|
case F_SETSIG:
|
||||||
@ -1806,6 +1814,10 @@ static int linux_fcntl(SysFrm *, int fd, int cmd, void *arg)
|
|||||||
case F_SETLKW:
|
case F_SETLKW:
|
||||||
case F_SETOWN_EX:
|
case F_SETOWN_EX:
|
||||||
case F_GETOWN_EX:
|
case F_GETOWN_EX:
|
||||||
|
case F_GETOWNER_UIDS:
|
||||||
|
case F_OFD_GETLK:
|
||||||
|
case F_OFD_SETLK:
|
||||||
|
case F_OFD_SETLKW:
|
||||||
{
|
{
|
||||||
fixme("cmd %d not implemented", cmd);
|
fixme("cmd %d not implemented", cmd);
|
||||||
return -ENOSYS;
|
return -ENOSYS;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user