Skip to contentSkip to conversation

doc: context_new(3): fix the return value description

PATCH In review Pádraig Brady 2 participants 3 messages Dec 4, 2012 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 doc: context_new(3): fix the return value description

---
 libselinux/man/man3/context_new.3 |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
libselinux/man/man3/context_new.3 +2 -2
index 820f927..ca7140e 100644
@@ -54,8 +54,8 @@ context_type_set, context_range_set, context_role_set, context_user_set
  Set a context component
 
 .SH "RETURN VALUE"
-On success, zero is returned. On failure, -1 is returned and errno is
-set appropriately.
+On failure, the context_*_set functions return non-zero, while other
+functions return zero or NULL.  errno is set appropriately.
 
 .SH "SEE ALSO"
 .BR selinux "(8)"
Signature · 7 lines
1.7.6.4


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#1 lore raw

On Mon, Dec 3, 2012 at 9:33 PM, Pádraig Brady <[email protected]> wrote:

I applied (and gave you credit for) the following patch. Does it look ok to you?

libselinux/man/man3/context_new.3 +7 -1
index 0257445..3dabac3 100644
@@ -69,7 +69,13 @@ structure.
 set a context component.
 .
 .SH "RETURN VALUE"
-On success, zero is returned. On failure, \-1 is returned and
+On failure
+.BR context_*_set ()
+functions return non-zero and 0 on success.
+
+The other functions return NULL on failure and non-NULL on success.
+
+On failure
 .I errno
 is set appropriately.
 .
#2 lore raw
Quoted 12 lines · Eric Paris

On Mon, Dec 3, 2012 at 9:33 PM, Pádraig Brady<[email protected]> wrote:

I applied (and gave you credit for) the following patch. Does it look ok to you?

tmp.patch

libselinux/man/man3/context_new.3 +0 -1
 
-On success, zero is returned. On failure, \-1 is returned and

libselinux/man/man3/context_new.3 structure. · line 81

Quoted 10 lines
libselinux/man/man3/context_new.3 +7 -0
+On failure
+.BR context_*_set ()
+functions return non-zero and 0 on success.
+
+The other functions return NULL on failure and non-NULL on success.
+
+On failure
  .I errno
  is set appropriately.
  .

thanks,
Pádraig.

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.