lkml.org 
[lkml]   [2009]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 4/4] keys: make procfiles per-user-namespace
Date
Serge E. Hallyn <serue@us.ibm.com> wrote:

> > Hmmm... I wonder if we can do better by making the file position indicate
> > the key ID rather than being a count of the number of keys read. It might
> > make this cleaner.
>
> file position? as in the result of lseek(fd, 0, SEEK_CUR)?
>
> I don't understand what you're suggesting.

Currently the file position on /proc/keys indicates the number of keys that
have been read. It is incremented by 1 for each key read, irrespective of the
length of the line that was read for that key.

We could, instead, map file positions to key IDs, and skip any file positions
that don't actually map to an extant key.

David


\
 
 \ /
  Last update: 2009-02-25 13:43    [W:0.062 / U:0.920 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site