lkml.org 
[lkml]   [2005]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 5/12] lsm stacking v0.2: actual stacker module
On Thu, 30 Jun 2005 serue@us.ibm.com wrote:

> +/* list modules */
> +static ssize_t listmodules_read (struct stacker_kobj *obj, char *buff)
> +{
> + ssize_t len = 0;
> + struct module_entry *m;
> +
> + rcu_read_lock();
> + stack_for_each_entry(m, &stacked_modules, lsm_list) {
> + len += snprintf(buff+len, PAGE_SIZE - len, "%s\n",
> + m->module_name);
> + }
> + rcu_read_unlock();
> +
> + return len;
> +}
> +

As far as I'm aware, sysfs nodes are supposed to contain one entity per
file. Not sure what the alternative here is, though.


- James
--
James Morris
<jmorris@redhat.com>


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-07-01 04:39    [from the cache]
©2003-2011 Jasper Spaans