mke2fs tool tapi (tapi_mke2fs)
Overview
TAPI to handle mke2fs tool. More…
// typedefs typedef struct tapi_mke2fs_opt tapi_mke2fs_opt; typedef struct tapi_mke2fs_app tapi_mke2fs_app; // structs struct tapi_mke2fs_opt; // global variables const tapi_mke2fs_opt tapi_mke2fs_default_opt; // global functions te_errno tapi_mke2fs_create(tapi_job_factory_t* factory, const tapi_mke2fs_opt* opt, tapi_mke2fs_app** app); te_errno tapi_mke2fs_start(tapi_mke2fs_app* app); te_errno tapi_mke2fs_wait(tapi_mke2fs_app* app, int timeout_ms); te_errno tapi_mke2fs_kill(tapi_mke2fs_app* app, int signum); te_errno tapi_mke2fs_stop(tapi_mke2fs_app* app); te_errno tapi_mke2fs_destroy(tapi_mke2fs_app* app); te_errno tapi_mke2fs_check_journal(tapi_mke2fs_app* app); te_errno tapi_mke2fs_do(tapi_job_factory_t* factory, const tapi_mke2fs_opt* opt, tapi_mke2fs_app** app, int timeout_ms);
Detailed Documentation
TAPI to handle mke2fs tool.
Copyright (C) 2020-2022 OKTET Labs Ltd. All rights reserved.
Typedefs
typedef struct tapi_mke2fs_opt tapi_mke2fs_opt
mke2fs tool specific command line options.
typedef struct tapi_mke2fs_app tapi_mke2fs_app
mke2fs tool information.
Global Variables
const tapi_mke2fs_opt tapi_mke2fs_default_opt
Default options initializer.
Global Functions
te_errno tapi_mke2fs_create(tapi_job_factory_t* factory, const tapi_mke2fs_opt* opt, tapi_mke2fs_app** app)
Create mke2fs app.
Parameters:
factory |
Job factory. |
opt |
mke2fs tool options. |
app |
mke2fs app handle. |
Returns:
Status code.
te_errno tapi_mke2fs_start(tapi_mke2fs_app* app)
Start mke2fs tool.
Parameters:
app |
mke2fs app handle. |
Returns:
Status code.
te_errno tapi_mke2fs_wait(tapi_mke2fs_app* app, int timeout_ms)
Wait for mke2fs tool completion.
Parameters:
app |
mke2fs app handle. |
timeout_ms |
Wait timeout in milliseconds. |
TE_EINPROGRESS |
mke2fs is still running. |
TE_ESHCMD |
mke2fs was never started or returned non-zero exit status. |
Returns:
Status code.
te_errno tapi_mke2fs_kill(tapi_mke2fs_app* app, int signum)
Send a signal to mke2fs tool.
Parameters:
app |
mke2fs app handle. |
signum |
Signal to send. |
Returns:
Status code.
te_errno tapi_mke2fs_stop(tapi_mke2fs_app* app)
Stop mke2fs tool. It can be started over with tapi_mke2fs_start().
Parameters:
app |
mke2fs app handle. |
Returns:
Status code.
te_errno tapi_mke2fs_destroy(tapi_mke2fs_app* app)
Destroy mke2fs app. The app cannot be used after calling this function.
Parameters:
app |
mke2fs app handle. |
Returns:
Status code.
te_errno tapi_mke2fs_check_journal(tapi_mke2fs_app* app)
Check if the filesystem was created with ext3 journal. The function should be called after tapi_mke2fs_wait().
Parameters:
app |
mke2fs app handle. |
0 |
tapi_mke2fs_opt::use_journal was not specified or it was specified and the filesystem was created with the journal |
TE_EPROTO |
tapi_mke2fs_opt::use_journal was specified but the journal was not created. |
Returns:
Status code.
te_errno tapi_mke2fs_do(tapi_job_factory_t* factory, const tapi_mke2fs_opt* opt, tapi_mke2fs_app** app, int timeout_ms)
A convenience wrapper for tapi_mke2fs_create/start/wait.
Parameters:
factory |
Job factory. |
opt |
mke2fs tool options. |
app |
mke2fs app handle. |
timeout_ms |
Wait timeout in milliseconds. |
Returns:
Status code.