[Patch]: mkdir -p and network drives

Corinna Vinschen corinna-cygwin@cygwin.com
Wed May 11 08:53:00 GMT 2005


On May 10 20:53, Pierre A. Humblet wrote:
> 	* dir.cc (isrofs): New function.
> 	(mkdir): Check for FH_FS and use isrofs.
> 	(rmdir): Use isrofs.
> 
> Index: dir.cc
> ===================================================================
> RCS file: /cvs/src/src/winsup/cygwin/dir.cc,v
> retrieving revision 1.84
> diff -u -p -r1.84 dir.cc
> --- dir.cc      16 Mar 2005 21:20:56 -0000      1.84
> +++ dir.cc      11 May 2005 00:38:11 -0000
> @@ -216,6 +216,13 @@ closedir (DIR *dir)
>    return res;
>  }
>  
> +inline bool 
> +isrofs(DWORD devn) 
> +{
> +  return devn == FH_PROC || devn == FH_REGISTRY 
> +    || devn == FH_PROCESS || devn == FH_NETDRIVE;
> +}
> +
>  /* mkdir: POSIX 5.4.1.1 */
>  extern "C" int
>  mkdir (const char *dir, mode_t mode)

I don't like the idea of isrofs being an inline function in dir.cc.
Wouldn't that be better a method in path_conv?  It would be helpful
for other functions, too.  For instance, unlink and symlink_worker.
In the (not so) long run we should really move all of these functions
into the fhandlers, though.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          mailto:cygwin@cygwin.com
Red Hat, Inc.



More information about the Cygwin-patches mailing list