mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
Started implementing sys/stat.h calls
svn path=/trunk/; revision=2964
This commit is contained in:
parent
75a810da7d
commit
bce8535f50
6 changed files with 171 additions and 0 deletions
30
posix/lib/psxdll/sys/stat/chmod.c
Normal file
30
posix/lib/psxdll/sys/stat/chmod.c
Normal file
|
@ -0,0 +1,30 @@
|
|||
/* $Id: chmod.c,v 1.1 2002/05/17 02:10:41 hyperion Exp $
|
||||
*/
|
||||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS POSIX+ Subsystem
|
||||
* FILE: subsys/psx/lib/psxdll/sys/stat/chmod.c
|
||||
* PURPOSE: Change mode of a file
|
||||
* PROGRAMMER: KJK::Hyperion <noog@libero.it>
|
||||
* UPDATE HISTORY:
|
||||
* 15/05/2002: Created
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
|
||||
int chmod(const char *path, mode_t mode)
|
||||
{
|
||||
errno = ENOSYS;
|
||||
return (-1);
|
||||
}
|
||||
|
||||
int fchmod(int fildes, mode_t mode)
|
||||
{
|
||||
errno = ENOSYS;
|
||||
return (-1);
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
34
posix/lib/psxdll/sys/stat/mkdir.c
Normal file
34
posix/lib/psxdll/sys/stat/mkdir.c
Normal file
|
@ -0,0 +1,34 @@
|
|||
/* $Id: mkdir.c,v 1.1 2002/05/17 02:10:41 hyperion Exp $
|
||||
*/
|
||||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS POSIX+ Subsystem
|
||||
* FILE: subsys/psx/lib/psxdll/sys/stat/mkdir.c
|
||||
* PURPOSE: Make a directory
|
||||
* PROGRAMMER: KJK::Hyperion <noog@libero.it>
|
||||
* UPDATE HISTORY:
|
||||
* 15/05/2002: Created
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int mkdir(const char *path, mode_t mode)
|
||||
{
|
||||
int nFileNo;
|
||||
|
||||
switch((nFileNo = open(path, O_CREAT | O_EXCL | _O_DIRFILE, mode)))
|
||||
{
|
||||
case -1:
|
||||
return (-1);
|
||||
|
||||
default:
|
||||
close(nFileNo);
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
24
posix/lib/psxdll/sys/stat/mkfifo.c
Normal file
24
posix/lib/psxdll/sys/stat/mkfifo.c
Normal file
|
@ -0,0 +1,24 @@
|
|||
/* $Id: mkfifo.c,v 1.1 2002/05/17 02:10:41 hyperion Exp $
|
||||
*/
|
||||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS POSIX+ Subsystem
|
||||
* FILE: subsys/psx/lib/psxdll/sys/stat/mkfifo.c
|
||||
* PURPOSE: Make a FIFO special file
|
||||
* PROGRAMMER: KJK::Hyperion <noog@libero.it>
|
||||
* UPDATE HISTORY:
|
||||
* 15/05/2002: Created
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
|
||||
int mkfifo(const char *path, mode_t mode)
|
||||
{
|
||||
errno = ENOSYS;
|
||||
return (-1);
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
23
posix/lib/psxdll/sys/stat/mknod.c
Normal file
23
posix/lib/psxdll/sys/stat/mknod.c
Normal file
|
@ -0,0 +1,23 @@
|
|||
/* $Id: mknod.c,v 1.1 2002/05/17 02:10:41 hyperion Exp $
|
||||
*/
|
||||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS POSIX+ Subsystem
|
||||
* FILE: subsys/psx/lib/psxdll/sys/stat/mknod.c
|
||||
* PURPOSE: Make a directory, a special or regular file
|
||||
* PROGRAMMER: KJK::Hyperion <noog@libero.it>
|
||||
* UPDATE HISTORY:
|
||||
* 15/05/2002: Created
|
||||
*/
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
|
||||
int mknod(const char *path, mode_t mode, dev_t dev)
|
||||
{
|
||||
errno = ENOSYS;
|
||||
return (-1);
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
36
posix/lib/psxdll/sys/stat/stat.c
Normal file
36
posix/lib/psxdll/sys/stat/stat.c
Normal file
|
@ -0,0 +1,36 @@
|
|||
/* $Id: stat.c,v 1.1 2002/05/17 02:10:41 hyperion Exp $
|
||||
*/
|
||||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS POSIX+ Subsystem
|
||||
* FILE: subsys/psx/lib/psxdll/sys/stat/stat.c
|
||||
* PURPOSE: Get file status
|
||||
* PROGRAMMER: KJK::Hyperion <noog@libero.it>
|
||||
* UPDATE HISTORY:
|
||||
* 15/05/2002: Created
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
|
||||
int fstat(int fildes, struct stat *buf)
|
||||
{
|
||||
errno = ENOSYS;
|
||||
return (-1);
|
||||
}
|
||||
|
||||
int lstat(const char *path, struct stat *buf)
|
||||
{
|
||||
errno = ENOSYS;
|
||||
return (-1);
|
||||
}
|
||||
|
||||
int stat(const char *path, struct stat *buf)
|
||||
{
|
||||
errno = ENOSYS;
|
||||
return (-1);
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
24
posix/lib/psxdll/sys/stat/umask.c
Normal file
24
posix/lib/psxdll/sys/stat/umask.c
Normal file
|
@ -0,0 +1,24 @@
|
|||
/* $Id: umask.c,v 1.1 2002/05/17 02:10:41 hyperion Exp $
|
||||
*/
|
||||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS POSIX+ Subsystem
|
||||
* FILE: subsys/psx/lib/psxdll/sys/stat/umask.c
|
||||
* PURPOSE:
|
||||
* PROGRAMMER: KJK::Hyperion <noog@libero.it>
|
||||
* UPDATE HISTORY:
|
||||
* 15/05/2002: Created
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
|
||||
mode_t umask(mode_t cmask)
|
||||
{
|
||||
errno = ENOSYS;
|
||||
return (-1);
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
Loading…
Reference in a new issue