From 8761c1dcf7378b6ce9dff32ef7537b113a25a48c Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sat, 4 May 2002 03:24:35 +0000 Subject: * net.cc (getdomainname): Change second argument of getdomainname to size_t. * fhandler_proc.cc (proc_listing): Add '.' and '..' to directory listing. (fhandler_proc::open): Change use of mode to flags. If the file does not exist already, fail with EROFS if O_CREAT flag is set. Change EROFS error to EACCES error when writing to a file. Use cmalloc to allocate memory for filebuf. (fhandler_proc::close): Use cfree to free filebuf. (fhandler_proc::get_proc_fhandler): Properly detect attempts to access unknown subdir. * fhandler_process.cc (process_listing): Add '.' and '..' to directory listing. (fhandler_process::open): Use cmalloc to allocate memory for filebuf. (fhandler_process::close): Use cfree to free filebuf. * fhandler_registry.cc (registry_listing): Add . and '..' to directory listing. (fhandler_registry::open): Move check for open for writing before open_key. Use cmalloc to allocate memory for filebuf. (fhandler_registry::close): Use cfree to free filebuf. (fhandler_registry::telldir): Use lower 16 bits of __d_position as position in directory. (fhandler_registry::seekdir): Ditto. * fhandler_virtual.cc (fhandler_virtual::write): Change EROFS error to EACCES error. (fhandler_virtual::open): Set the NOHANDLE flag. (fhandler_virtual::dup): Add call to fhandler_base::dup. Allocate child's filebuf using cmalloc. Copy filebuf from parent to child. (fhandler_virtual::close): Use cfree to free filebuf. (fhandler_virtual::~fhandler_virtual): Ditto. (from Chris Faylor ). (fhandler_registry::readdir): Add support for '.' and '..' files in subdirectories of /proc/registry. * path.cc (path_conv::check): Do not return ENOENT if a file is not found in /proc. --- winsup/cygwin/path.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'winsup/cygwin/path.cc') diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 9299c0159..bebb4027d 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -525,13 +525,11 @@ path_conv::check (const char *src, unsigned opt, int file_type = fh->exists (path_copy); switch (file_type) { - case 0: - error = ENOENT; - break; case 1: case 2: fileattr = FILE_ATTRIBUTE_DIRECTORY; break; + default: case -1: fileattr = 0; } -- cgit v1.2.3