This is the mail archive of the cygwin-patches 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] cygcheck: follow symbolic links


On Fri, 17 Feb 2006, Igor Peshansky wrote:

> On Fri, 17 Feb 2006, Corinna Vinschen wrote:
>
> > On Feb 16 12:26, Igor Peshansky wrote:
> > > On Thu, 16 Feb 2006, Corinna Vinschen wrote:
> > > > - Most of your patch should go into path.cc so it can be reused,
> > > >   for instance in strace.
> > >
> > > Agreed -- that's why I put that TODO in there. :-)  Should I move it
> > > in the next iteration of the patch?
> >
> > Please move it now.  I don't think it's non-trivial enough to justify
> > multiple iterations.
>
> Whoops.  Misspoke.  I meant "incarnation".  Never mind, I'll just do it.
> :-)  Expect a new patch today.

I guess "today" is a stretchable concept. :-)  In any case, here's a new
patch.  Moving things into path.cc turned out to be indeed non-trivial,
since the new functionality was using static functions in cygcheck.cc
which now needed to be moved out into a separate file.  I don't expect
this to be applied right away (hence no ChangeLog), but is this along the
lines of what you were expecting?

> > > > - Couldn't you just reuse the readlink implementation in
> > > >   ../cygwin/path.cc as is, to avoid having to different
> > > >   implementations?
> > >
> > > Umm, most of that code is very general purpose, and has too much
> > > extra stuff in it.  I basically used part of it
> > > (symlink_info::check_shortcut) for my implementation.  I wanted
> > > something lightweight and easy to understand (also, the code in
> > > path.cc doesn't check for PE headers, so I had to write that part
> > > anyway).
> >
> > Well, what I meant isn't readlink but symlink_info::check_shortcut and
> > cmp_shortcut_header.  It would be helpful if the rules to identify a
> > symlink are identical, wouldn't it?  As for the PE headers, that's
> > fine.
>
> It would certainly help, but then we would need to extract the bit of
> code that deals with symlinks and put it in a Cygwin-independent static
> library.  See my reply to Dave.

I did copy cmp_shortcut_header, but most of the rest of the code was
judicious cut-and-paste (with some rewriting on the side).  Again, it
wasn't as trivial as you made it sound.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha@cs.nyu.edu | igor@watson.ibm.com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

Attachment: cygcheck-follow-symlinks.patch
Description: Text document


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