BlockDev.ExtraArg¶
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
opt |
r/w |
extra option (command line option for most functions that allow extra options to be passed, e.g. “-L” to call |
|
val |
r/w |
value for opt, can be an empty string or |
Methods¶
class |
|
class |
|
|
|
|
Details¶
- class BlockDev.ExtraArg¶
See
BlockDev.ExtraArg.new
() for an example on how to construct the extra args.- classmethod list_free(args)¶
- Parameters:
args ([
BlockDev.ExtraArg
] orNone
) – A list ofBlockDev.ExtraArg
to free
Frees args and all its elements.
- classmethod new(opt, val)¶
- Parameters:
- Returns:
a new extra argument
- Return type:
Example of calling
BlockDev.fs_xfs_mkfs
() with an extra argument. This will result in callingmkfs.xfs
with-L label
.BDExtraArg label_arg = {"-L", "label"}; const BDExtraArg *extra_args[2] = {&label_arg, NULL}; ret = bd_fs_xfs_mkfs ("/dev/sda", extra_args, error);
- copy()¶
- Return type:
Creates a new copy of self.
- free()¶
Frees self.