[PATH 0 of 1] Fix check for nice() return value

2013-05-21 Thread Lee Duncan
I mentioned this before, but I didn't have a good solution at the time.

In usr/iscsi_util.c, nice() is called like this:

if (nice(-10)  0)
log_debug(...)

The problem is that nice() returns the current nice value,
and that value can legitimately be less than zero, in which
case a spurious log message is generated.

Although I don't like setting errno directly except when in a
library, the nice(2) man page actually suggests this as the
best way to fix the problem.

Therefore, the supplied patch is designed to fix this problem.

--
Ignore the Lee-Man behind the curtain ...

 Life's a long song. But the tune ends too soon for us 
all. -- Ian Anderson

-- 
You received this message because you are subscribed to the Google Groups 
open-iscsi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to open-iscsi+unsubscr...@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at http://groups.google.com/group/open-iscsi?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [PATH 0 of 1] Fix check for nice() return value

2013-05-21 Thread The Lee-Man
Apologies for Subject formatting errors ... I need to wean myself off of OS 
X ...

On Tuesday, May 21, 2013 2:15:00 PM UTC-7, The Lee-Man wrote:

 I mentioned this before, but I didn't have a good solution at the time. 

 In usr/iscsi_util.c, nice() is called like this: 

 if (nice(-10)  0) 
 log_debug(...) 

 The problem is that nice() returns the current nice value, 
 and that value can legitimately be less than zero, in which 
 case a spurious log message is generated. 

 Although I don't like setting errno directly except when in a 
 library, the nice(2) man page actually suggests this as the 
 best way to fix the problem. 

 Therefore, the supplied patch is designed to fix this problem. 

 -- 
 Ignore the Lee-Man behind the curtain ... 

  Life's a long song. But the tune ends too soon for 
 us all. -- Ian Anderson 



-- 
You received this message because you are subscribed to the Google Groups 
open-iscsi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to open-iscsi+unsubscr...@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at http://groups.google.com/group/open-iscsi?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.