This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch]: mkdir -p and network drives


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]