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

[linux-lvm] Question regarding liblvm2cmd



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



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