lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120913181124.GD7677@google.com>
Date:	Thu, 13 Sep 2012 11:11:24 -0700
From:	Tejun Heo <tj@...nel.org>
To:	Randy Dunlap <rdunlap@...otime.net>
Cc:	Aristeu Rozanski <aris@...hat.com>, linux-kernel@...r.kernel.org,
	cgroups@...r.kernel.org, Li Zefan <lizefan@...wei.com>,
	Hillf Danton <dhillf@...il.com>,
	Lennart Poettering <lpoetter@...hat.com>,
	Hugh Dickins <hughd@...gle.com>
Subject: Re: [PATCH v2 2/2] fs: add missing documentation to simple_xattr
 functions

On Thu, Sep 13, 2012 at 11:02:14AM -0700, Randy Dunlap wrote:
> On 09/11/2012 01:28 PM, Aristeu Rozanski wrote:
> 
> 
> +/**
> + * simple_xattr_set: xattr SET operation for in-memory/pseudo filesystems
> 
> The format for the function name/description uses '-', not ':', as:
> 
>  * simple_xattr_set - xattr SET operation for in-memory/pseudo filesystems
> 
> + * @xattrs: simple_xattr list
> + * @name: name of the new extended attribute
> + * @value: value of the new extended attribute. If NULL, will remove the
> + *	   attribute
> 
> Missing @size parameter description.

Updated the patch in place accordingly.  Thanks.

>From 4895768b6aab55bbdbebcf2da090cb1a5ccf5463 Mon Sep 17 00:00:00 2001
From: Aristeu Rozanski <aris@...hat.com>
Date: Tue, 11 Sep 2012 16:28:11 -0400
Subject: [PATCH] fs: add missing documentation to simple_xattr functions

v2: add function documentation instead of adding a separate file under
    Documentation/

tj: Updated comment a bit and rolled in Randy's suggestions.

Cc: Li Zefan <lizefan@...wei.com>
Cc: Tejun Heo <tj@...nel.org>
Cc: Hugh Dickins <hughd@...gle.com>
Cc: Hillf Danton <dhillf@...il.com>
Cc: Lennart Poettering <lpoetter@...hat.com>
Cc: Randy Dunlap <rdunlap@...otime.net>
Signed-off-by: Aristeu Rozanski <aris@...hat.com>
Signed-off-by: Tejun Heo <tj@...nel.org>
---
 fs/xattr.c |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/fs/xattr.c b/fs/xattr.c
index e17e773..f053c11 100644
--- a/fs/xattr.c
+++ b/fs/xattr.c
@@ -892,8 +892,19 @@ out:
 
 }
 
-/*
- * xattr SET operation for in-memory/pseudo filesystems
+/**
+ * simple_xattr_set - xattr SET operation for in-memory/pseudo filesystems
+ * @xattrs: target simple_xattr list
+ * @name: name of the new extended attribute
+ * @value: value of the new xattr. If %NULL, will remove the attribute
+ * @size: size of the new xattr
+ * @flags: %XATTR_{CREATE|REPLACE}
+ *
+ * %XATTR_CREATE is set, the xattr shouldn't exist already; otherwise fails
+ * with -EEXIST.  If %XATTR_REPLACE is set, the xattr should exist;
+ * otherwise, fails with -ENODATA.
+ *
+ * Returns 0 on success, -errno on failure.
  */
 int simple_xattr_set(struct simple_xattrs *xattrs, const char *name,
 		     const void *value, size_t size, int flags)
@@ -950,6 +961,9 @@ ssize_t simple_xattr_list(struct simple_xattrs *xattrs, char *buffer,
 	return used;
 }
 
+/*
+ * Adds an extended attribute to the list
+ */
 void simple_xattr_list_add(struct simple_xattrs *xattrs,
 			   struct simple_xattr *new_xattr)
 {
-- 
1.7.7.3

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ