On 28 Jan 2009 at 22:51, Hans de Goede wrote:

> Hi All,
> 
> While testing I noticed that idbm_lock() uses exit when it cannot lock, 
> leading 
> to interesting effect when using it from libiscsi, when typing "import 
> libiscsi" in python as normal user, my entire python interpreter exited, not 
> good.
> 
> The attached patch instead returns an error code, and fixes all callers to 
> check this.

Hi!

Let me comment on this:
                if (errno != EEXIST) {
+                       log_error("Maybe you are not root?");

In case of an error, don't try to spewculate, but give details (i.e. "errno") 
instead. Would something be wrong with using strerror(errno) here?

Also, for a library when returning error codes, there is no need to print 
messages 
(unless there is a generic error reporting framework that can be customized).

Regards,
Ulrich


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~----------~----~----~----~------~----~------~--~---

Reply via email to