Started implementing sys/stat.h calls
authorKJK::Hyperion <hackbunny@reactos.org>
Fri, 17 May 2002 02:10:41 +0000 (02:10 +0000)
committerKJK::Hyperion <hackbunny@reactos.org>
Fri, 17 May 2002 02:10:41 +0000 (02:10 +0000)
svn path=/trunk/; revision=2964

posix/lib/psxdll/sys/stat/chmod.c [new file with mode: 0644]
posix/lib/psxdll/sys/stat/mkdir.c [new file with mode: 0644]
posix/lib/psxdll/sys/stat/mkfifo.c [new file with mode: 0644]
posix/lib/psxdll/sys/stat/mknod.c [new file with mode: 0644]
posix/lib/psxdll/sys/stat/stat.c [new file with mode: 0644]
posix/lib/psxdll/sys/stat/umask.c [new file with mode: 0644]

diff --git a/posix/lib/psxdll/sys/stat/chmod.c b/posix/lib/psxdll/sys/stat/chmod.c
new file mode 100644 (file)
index 0000000..deff306
--- /dev/null
@@ -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 */
+
diff --git a/posix/lib/psxdll/sys/stat/mkdir.c b/posix/lib/psxdll/sys/stat/mkdir.c
new file mode 100644 (file)
index 0000000..d205dc9
--- /dev/null
@@ -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 */
+
diff --git a/posix/lib/psxdll/sys/stat/mkfifo.c b/posix/lib/psxdll/sys/stat/mkfifo.c
new file mode 100644 (file)
index 0000000..4eb0d02
--- /dev/null
@@ -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 */
+
diff --git a/posix/lib/psxdll/sys/stat/mknod.c b/posix/lib/psxdll/sys/stat/mknod.c
new file mode 100644 (file)
index 0000000..29ed821
--- /dev/null
@@ -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 */
+
diff --git a/posix/lib/psxdll/sys/stat/stat.c b/posix/lib/psxdll/sys/stat/stat.c
new file mode 100644 (file)
index 0000000..d9a8c8e
--- /dev/null
@@ -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 */
+
diff --git a/posix/lib/psxdll/sys/stat/umask.c b/posix/lib/psxdll/sys/stat/umask.c
new file mode 100644 (file)
index 0000000..11f5125
--- /dev/null
@@ -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 */
+