| 1 |
#include <glib.h> |
| 2 |
#include <glib-object.h> |
| 3 |
|
| 4 |
#ifndef BD_UTILS_EXTRA_ARG |
| 5 |
#define BD_UTILS_EXTRA_ARG |
| 6 |
|
| 7 |
#define BD_UTIL_TYPE_EXTRA_ARG (bd_extra_arg_get_type ()) |
| 8 |
GType bd_extra_arg_get_type (void); |
| 9 |
|
| 10 |
/** |
| 11 |
* BDExtraArg: |
| 12 |
* @opt: extra option (command line option for most functions that allow extra options |
| 13 |
* to be passed, e.g. "-L" to call `mkfs.xfs -L`) |
| 14 |
* @val: value for @opt, can be an empty string or %NULL for options without parameter |
| 15 |
* |
| 16 |
* See bd_extra_arg_new() for an example on how to construct the extra args. |
| 17 |
*/ |
| 18 |
typedef struct BDExtraArg { |
| 19 |
gchar *opt; |
| 20 |
gchar *val; |
| 21 |
} BDExtraArg; |
| 22 |
|
| 23 |
BDExtraArg* bd_extra_arg_copy (BDExtraArg *arg); |
| 24 |
void bd_extra_arg_free (BDExtraArg *arg); |
| 25 |
void bd_extra_arg_list_free (BDExtraArg **args); |
| 26 |
BDExtraArg* bd_extra_arg_new (const gchar *opt, const gchar *val); |
| 27 |
|
| 28 |
#endif /* BD_UTILS_EXTRA_ARG */ |