lkml.org 
[lkml]   [2009]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] firewire: core: add sysfs attribute for easier udev rules
Stefan Richter wrote:
> + while (fw_csr_iterator_next(&ci, &key, &value)) {
> + if (key != (CSR_UNIT | CSR_DIRECTORY))
> + continue;
> + i += units_sprintf(&buf[i], ci.p + value - 1);
> + if (i >= PAGE_SIZE - (8 + 1 + 8 + 1))
> + break;
> + }
> + up_read(&fw_device_rwsem);
> +
> + sprintf(&buf[i ? i - 1 : 0], "\n");

Rather:
if (i)
buf[i - 1] = '\n';
> +
> + return i;
> +}
--
Stefan Richter
-=====-==--= -=-= =-===
http://arcgraph.de/sr/


\
 
 \ /
  Last update: 2009-05-23 00:07    [W:0.047 / U:1.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site