Question regarding liblvm2cmd

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

 



Hello,

I am working with liblvm2cmd within a program that aims to simplify
typical LV management tasks from a web interface. Using the library
allows me to accomplish this with better sanity and safety.

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/.

For instance, if you try to create a LV of a size that exceeds the
capacity of the given VG, its easy to tell that something went wrong and
print the response from lvm in the callback. However, it seems rather
difficult for the calling function to know what went wrong. The user
knows, obviously, by what is printed.

Barring picking apart the strings that would be printed for any given
level, is there some other way to make a program understand the nature
of a failure?

Many thanks in advance.

Cheers,
--Tim


_______________________________________________
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