···11+#include "chflags.h"
22+#include "../base.h"
33+#include "../errno.h"
44+#include <asm/unistd.h>
55+#include "../../../../../platform-include/sys/errno.h"
66+77+long sys_chflags(const char* file, int flags)
88+{
99+ // TODO: We could implement this via ioctl(fd, FS_IOC_GETFLAGS/FS_IOC_SETFLAGS),
1010+ // but it requires root and this functionality is not all that important.
1111+ //
1212+ // Returning ENOTSUP indicates that this filesystem doesn't support file flags,
1313+ // which is true on NFS for example, so applications must accept this error return.
1414+ return -ENOTSUP;
1515+}
1616+
···11+#ifndef LINUX_CHMOD_EXTENDED_H
22+#define LINUX_CHMOD_EXTENDED_H
33+44+long sys_chmod_extended(const char* path, int uid, int gid, int mode, void* xsec);
55+66+#endif
77+
+16
src/kernel/emulation/linux/unistd/fchflags.c
···11+#include "fchflags.h"
22+#include "../base.h"
33+#include "../errno.h"
44+#include <asm/unistd.h>
55+#include "../../../../../platform-include/sys/errno.h"
66+77+long sys_fchflags(int fd, int flags)
88+{
99+ // TODO: We could implement this via ioctl(fd, FS_IOC_GETFLAGS/FS_IOC_SETFLAGS),
1010+ // but it requires root and this functionality is not all that important.
1111+ //
1212+ // Returning ENOTSUP indicates that this filesystem doesn't support file flags,
1313+ // which is true on NFS for example, so applications must accept this error return.
1414+ return -ENOTSUP;
1515+}
1616+