[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH glibc] Add file record locking support
From: |
Svante Signell |
Subject: |
Re: [PATCH glibc] Add file record locking support |
Date: |
Thu, 08 Jan 2015 19:54:12 +0100 |
On Thu, 2015-01-08 at 19:06 +0100, Guillem Jover wrote:
> On Thu, 2015-01-08 at 18:03:31 +0100, Svante Signell wrote:
> > On Thu, 2015-01-08 at 16:56 +0100, Guillem Jover wrote:
> > > On Thu, 2015-01-08 at 12:40:12 +0100, Svante Signell wrote:
> > Yes you are right, no checks are made. I removed the malloc part. What
> > about freeing fl64 later on?
>
> You cannot free() memory from the stack, no. It gets released
> automatically when it gets out of scope (but this is basic C).
Of course.
>
> I'm assuming you didn't build this. It should be fl64.<member>, and
> __file_record_lock(..., &fl64), and the free() would also have given
> you an error there, please build-test it.
You made me confused, so all changes were not made. I think the malloc
version was better for symmetry reasons. Changed anyway.
> > + case F_GETLK64:
> > + case F_SETLK64:
> > + case F_SETLKW64:
> > + {
> > + struct flock64 *fl = va_arg (ap, struct flock64 *);
> > +
> > + switch (fl->l_type)
> > + {
>
> Still space vs tab here.
Yes, the editor adds spaces up till 7 blanks, and eight spaces are
replaced by a tab, and the adds spces until two tabs, etc.
The other code does also contain these constructs. What to do, untabify
the whole file?
Updated patch, building in progress.
fcntl.diff
Description: Text Data