[linux-lvm] Question regarding liblvm2cmd

Alasdair G Kergon agk at redhat.com
Wed Oct 8 14:45:25 UTC 2008


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 at redhat.com




More information about the linux-lvm mailing list