Re: Question regarding liblvm2cmd

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

 



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

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux