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] Add getmntent_r

On Jul 18 15:23, Yaakov (Cygwin/X) wrote:
> On 2012-07-18 06:17, Corinna Vinschen wrote:
> >On Jul 18 05:21, Yaakov (Cygwin/X) wrote:
> >>On 2012-06-06 02:33, Corinna Vinschen wrote:
> >>>In case of Cygwin this is not needed since we don't read from the file
> >>>but from the internal datastructure.  There's no reason to create
> >>>garbage in buf just because this is by chance the layout the buffer gets
> >>>when operating under Linux.
> >>>
> >>>The *important* thing is that buf contains the strings the members of
> >>>mntbuf points to.
> >>
> >>OK, revised patch attached.
> >
> >Thanks.  Applied with a tweak:  It's really not necessary at all to
> >create strings for mnt_freq and mnt_passno in buf.  Just copy them
> >over from mnt to mntbuf and be done with it.
> In that case, we don't need opts_len, and AFAICS it will introduce a
> warning with GCC 4.6 [-Wunused-but-set-variable].  OK to remove?



Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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