2
* Copyright (C) 2004,2005 Heinz Mauelshagen, Red Hat GmbH.
5
* See file LICENSE at the top of this source tree for license information.
9
* See commands.[ch] for the perform() function call abstraction below.
12
#include <dmraid/dmraid.h>
17
int main(int argc, char **argv)
20
struct lib_context *lc;
22
/* Initialize library (creates a context to use it). */
23
if ((lc = libdmraid_init(argc, argv))) {
25
* Parse command line arguments and run 'early'
26
* functions for options which set library context
27
* variables (eg, --debug).
29
* Initialize locking afterwards, so that the
30
* '--ignorelocking' option can be recognized.
32
* If both are ok -> perform the required action.
34
ret = handle_args(lc, argc, &argv) &&
38
/* Cleanup the library context. */
42
/* Set standard exit code. */
43
exit (ret ? EXIT_SUCCESS : EXIT_FAILURE);