diff options
author | Wanlong Gao <wanlong.gao@gmail.com> | 2012-01-14 00:22:09 +0800 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-01-13 16:48:22 +0000 |
commit | 38a0966da88da6d199eb1da37456b4c33f4901da (patch) | |
tree | 58572c4bb0f9d747ec520db9a46291fe6a239454 /generator | |
parent | 0eaf06e673833bc25673d5c3d2487fffae310285 (diff) | |
download | libguestfs-38a0966da88da6d199eb1da37456b4c33f4901da.tar.gz libguestfs-38a0966da88da6d199eb1da37456b4c33f4901da.tar.xz libguestfs-38a0966da88da6d199eb1da37456b4c33f4901da.zip |
NEW API: add a new api e2fsck
m: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Add a new api e2fsck with two options:
correct: same as '-p' option of e2fsck
forceall: same as '-y' option of e2fsck
Thanks for Rich's idea.
v1->v2: use optargs_bitmask
v2->v3: change the optargs_bitmask check
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Diffstat (limited to 'generator')
-rw-r--r-- | generator/generator_actions.ml | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/generator/generator_actions.ml b/generator/generator_actions.ml index fb82bb6b..2e40c390 100644 --- a/generator/generator_actions.ml +++ b/generator/generator_actions.ml @@ -3454,6 +3454,8 @@ are activated or deactivated."); ["umount"; "/"]; ["lvresize"; "/dev/VG/LV"; "20"]; ["e2fsck_f"; "/dev/VG/LV"]; + ["e2fsck"; "/dev/VG/LV"; "true"; "false"]; + ["e2fsck"; "/dev/VG/LV"; "false"; "true"]; ["resize2fs"; "/dev/VG/LV"]; ["mount_options"; ""; "/dev/VG/LV"; "/"]; ["cat"; "/new"]], "test content"); @@ -6597,6 +6599,28 @@ The usage of this device, for example C<filesystem> or C<raid>. =back"); + ("e2fsck", (RErr, [Device "device"], [OBool "correct"; OBool "forceall"]), 304, [], + [], (* lvresize tests this *) + "check an ext2/ext3 filesystem", + "\ +This runs the ext2/ext3 filesystem checker on C<device>. +Force to check the filesystem even if it appears to be clean. + +=over 4 + +=item C<correct> + +Automatically repair the file system. This option will cause e2fsck to automatically +fix any filesystem problems that can be safely fixed without human intervention. +This option may not be specified at the same time as the C<forceall> option. + +=item C<forceall> + +Assume an answer of 'yes' to all questions; allows e2fsck to be used non-interactively. +This option may not be specified at the same time as the C<correct> option. + +=back"); + ] let all_functions = non_daemon_functions @ daemon_functions |