Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-05-25 08:32:59 +0400
committerChristopher Faylor <me@cgf.cx>2005-05-25 08:32:59 +0400
commit125b724dd8cec4f83445e8349dfbb8c7e06e1816 (patch)
treec170bdb4fcf7f807a9cd0d5e8db0e58f43fe1970 /winsup/cygwin/fhandler.cc
parent2a41ee9e0c97a23d472004a5dd8a951dc3be4728 (diff)
* fhandler.h (fhandler_base::mkdir): New virtual method.
(fhandler_base::rmdir): Ditto. (fhandler_disk_file:mkdir): New method. (fhandler_disk_file:rmdir): Ditto. * dir.cc (mkdir): Implement with fhandlers. (rmdir): Ditto. * fhandler.cc (fhandler_base::mkdir): New virtual method. (fhandler_base::rmdir): Ditto. (fhandler_disk_file::mkdir): New method. (fhandler_disk_file::rmdir): Ditto. fhandler_random.cc: white space.
Diffstat (limited to 'winsup/cygwin/fhandler.cc')
-rw-r--r--winsup/cygwin/fhandler.cc22
1 files changed, 22 insertions, 0 deletions
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index ba81cd3a6..6c0eaec38 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
@@ -1509,6 +1509,28 @@ fhandler_base::set_nonblocking (int yes)
openflags = (openflags & ~O_NONBLOCK_MASK) | new_flags;
}
+int
+fhandler_base::mkdir (mode_t)
+{
+ if (exists ())
+ set_errno (EEXIST);
+ else
+ set_errno (EROFS);
+ return -1;
+}
+
+int
+fhandler_base::rmdir ()
+{
+ if (!exists ())
+ set_errno (ENOENT);
+ else if (!pc.isdir ())
+ set_errno (ENOTDIR);
+ else
+ set_errno (EROFS);
+ return -1;
+}
+
DIR *
fhandler_base::opendir ()
{