lkml.org 
[lkml]   [2007]   [Dec]   [27]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateThu, 27 Dec 2007 18:54:12 +1100 (EST)
FromJames Morris <>
SubjectRe: [PATCH] Exporting capability code/name pairs
On Thu, 27 Dec 2007, KaiGai Kohei wrote:


(Please put the patch above the .sig separator).

+       len = strlen(tmp);
+
+       if (ofs >= len)
+               return 0;
+
+       if (len - ofs < count)
+               count = len - ofs;
+
+       rc = copy_to_user(buffer, tmp + ofs, count);
+       if (rc)
+               return rc;
+
+       *ppos += count;
Use simple_read_from_buffer().



- James
-- 
James Morris
<jmorris@namei.org>



\
 
 \ /
  Last update: 2007-12-27 09:03    [from the cache]
©2003-2008