libposix: stub chown family (always returning 0)
I do not expect chown, fchownat and lchown to be much used in UNIX softwares that we care to port. We stub the functions in libposix so that we can refer them from standard C libaries (such as newlib). We will implement them (parsing /cfg/users to determinate uid and gid) when it will be actually needed from a software ported to Jehanne.
This commit is contained in:
parent
6fd5c75ab3
commit
0bc2e60c72
|
@ -90,6 +90,9 @@ extern int POSIX_access(int *errnop, const char *path, int amode);
|
||||||
extern void POSIX_exit(int code) __attribute__((noreturn));
|
extern void POSIX_exit(int code) __attribute__((noreturn));
|
||||||
extern int POSIX_chmod(int *errnop, const char *path, int mode);
|
extern int POSIX_chmod(int *errnop, const char *path, int mode);
|
||||||
extern int POSIX_fchmodat(int *errnop, int fd, const char *path, long mode, int flag);
|
extern int POSIX_fchmodat(int *errnop, int fd, const char *path, long mode, int flag);
|
||||||
|
extern int POSIX_chown(int *errnop, const char *pathname, int owner, int group);
|
||||||
|
extern int POSIX_fchownat(int *errnop, int fd, const char *path, int owner, int group, int flag);
|
||||||
|
extern int POSIX_lchown(int *errnop, const char *path, int owner, int group);
|
||||||
extern int POSIX_chdir(int *errnop, const char *path);
|
extern int POSIX_chdir(int *errnop, const char *path);
|
||||||
extern int POSIX_fchdir(int *errnop, int fd);
|
extern int POSIX_fchdir(int *errnop, int fd);
|
||||||
extern int POSIX_mkdir(int *errnop, const char *path, int mode);
|
extern int POSIX_mkdir(int *errnop, const char *path, int mode);
|
||||||
|
|
|
@ -529,6 +529,27 @@ FailWithError:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
POSIX_chown(int *errnop, const char *pathname, int owner, int group)
|
||||||
|
{
|
||||||
|
/* TODO: implement when actually needed */
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
POSIX_fchownat(int *errnop, int fd, const char *path, int owner, int group, int flag)
|
||||||
|
{
|
||||||
|
/* TODO: implement when actually needed */
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
POSIX_lchown(int *errnop, const char *path, int owner, int group)
|
||||||
|
{
|
||||||
|
/* TODO: implement when actually needed */
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
POSIX_chdir(int *errnop, const char *path)
|
POSIX_chdir(int *errnop, const char *path)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue