Started implementing sys/stat.h calls

svn path=/trunk/; revision=2964
This commit is contained in:
KJK::Hyperion 2002-05-17 02:10:41 +00:00
parent 75a810da7d
commit bce8535f50
6 changed files with 171 additions and 0 deletions

View 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 */

View 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 */

View 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 */

View 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 */

View 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 */

View 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 */