[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [linux-lvm] Question regarding liblvm2cmd



On Sat, Sep 13, 2008 at 11:43:57AM +0800, Tim Post wrote:
> I noticed that lvm2_run() only has a few possible return values and does
> not set a global errno to give more information as to why something may
> have failed. I inspected lvm2_run() and _run_command() in tools/.

This is a tricky one.  Work has begun on developing a proper library,
but the error handling mechanism is not yet resolved.  I am reluctant to
see 1001 specific lvm2 error codes introduced - this would be a
maintenance and documentation headache - but doing things errno-style
might be an acceptable compromise.  My question is usually: 'But how can
the caller make genuine use of the error code?' - if it failed, it
failed, how does having a specific error code really help?

Alasdair
-- 
agk redhat com


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]