Top | ![]() |
![]() |
![]() |
![]() |
enum | BDUtilsProgStatus |
#define | BD_UTILS_EXEC_ERROR |
enum | BDUtilsExecError |
BDExtraArg | |
#define | EXBIBYTE |
#define | EiB |
#define | GIBIBYTE |
#define | GiB |
#define | KIBIBYTE |
#define | KiB |
#define | MEBIBYTE |
#define | MiB |
#define | PEBIBYTE |
#define | PiB |
#define | TEBIBYTE |
#define | TiB |
void (*BDUtilsProgFunc) (guint64 task_id
,BDUtilsProgStatus status
,guint8 completion
,gchar *msg
);
void (*BDUtilsLogFunc) (gint level
,const gchar *msg
);
Function type for logging function used by the libblockdev's exec utils to log the information about program executing.
gboolean bd_utils_exec_and_report_error (const gchar **argv
,const BDExtraArg **extra
,GError **error
);
gboolean bd_utils_exec_and_report_status_error (const gchar **argv
,const BDExtraArg **extra
,gint *status
,GError **error
);
gboolean bd_utils_exec_and_capture_output (const gchar **argv
,const BDExtraArg **extra
,gchar **output
,GError **error
);
gboolean bd_utils_exec_and_report_error_no_progress (const gchar **argv
,const BDExtraArg **extra
,GError **error
);
gboolean bd_utils_exec_and_report_progress (const gchar **argv
,const BDExtraArg **extra
,BDUtilsProgExtract prog_extract
,gint *proc_status
,GError **error
);
argv |
the argv array for the call. |
[array zero-terminated=1] |
extra |
extra arguments. |
[allow-none][array zero-terminated=1] |
prog_extract |
function for extracting progress information. |
[scope notified] |
proc_status |
place to store the process exit status. |
[out] |
error |
place to store error (if any). |
[out] |
gboolean bd_utils_init_logging (BDUtilsLogFunc new_log_func
,GError **error
);
new_log_func |
logging function to use or
|
[allow-none][scope notified] |
error |
place to store error (if any). |
[out] |
gboolean bd_utils_init_prog_reporting (BDUtilsProgFunc new_prog_func
,GError **error
);
new_prog_func |
progress reporting function to
use or |
[allow-none][scope notified] |
error |
place to store error (if any). |
[out] |
void bd_utils_report_progress (guint64 task_id
,guint64 completion
,gchar *msg
);
gboolean bd_utils_echo_str_to_file (const gchar *str
,const gchar *file_path
,GError **error
);
gboolean bd_utils_check_util_version (const gchar *util
,const gchar *version
,const gchar *version_arg
,const gchar *version_regexp
,GError **error
);
util |
name of the utility to check |
|
version |
minimum required version of the utility or |
[allow-none] |
version_arg |
argument to use with the |
[allow-none] |
version_regexp |
regexp to extract version from the version
info or |
[allow-none] |
error |
place to store error (if any). |
[out] |
gint bd_utils_version_cmp (const gchar *ver_string1
,const gchar *ver_string2
,GError **error
);
BDExtraArg * bd_extra_arg_new (const gchar *opt
,const gchar *val
);
[constructor]