From 36f9dac1a2530b575dab9226f6ddd85e6e8c8590 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Thu, 30 Apr 2009 19:32:58 +0100 Subject: [PATCH 1/1] Added notes to the 'fsck' command documentation. --- fish/cmds.c | 2 +- guestfish-actions.pod | 25 +++++++++++++++++++++---- guestfs-actions.pod | 25 +++++++++++++++++++++---- java/com/redhat/et/libguestfs/GuestFS.java | 19 ++++++++++++++----- perl/lib/Sys/Guestfs.pm | 25 +++++++++++++++++++++---- python/guestfs.py | 19 ++++++++++++++----- src/generator.ml | 27 ++++++++++++++++++++++----- 7 files changed, 114 insertions(+), 28 deletions(-) diff --git a/fish/cmds.c b/fish/cmds.c index c23da2f..142b595 100644 --- a/fish/cmds.c +++ b/fish/cmds.c @@ -443,7 +443,7 @@ void display_command (const char *cmd) pod2text ("get-e2uuid - get the ext2/3/4 filesystem UUID", " get-e2uuid \n\nThis returns the ext2/3/4 filesystem UUID of the filesystem on\nC."); else if (strcasecmp (cmd, "fsck") == 0) - pod2text ("fsck - run the filesystem checker", " fsck \n\nThis runs the filesystem checker (fsck) on C which\nshould have filesystem type C.\n\nThe returned integer is the status. See L for the\nlist of status codes from C, and note that multiple\nstatus codes can be summed together.\n\nIt is entirely equivalent to running C.\nNote that checking or repairing NTFS volumes is not supported\n(by linux-ntfs)."); + pod2text ("fsck - run the filesystem checker", " fsck \n\nThis runs the filesystem checker (fsck) on C which\nshould have filesystem type C.\n\nThe returned integer is the status. See L for the\nlist of status codes from C.\n\nNotes:\n\n=over 4\n\n=item *\n\nMultiple status codes can be summed together.\n\n=item *\n\nA non-zero return code can mean \"success\", for example if\nerrors have been corrected on the filesystem.\n\n=item *\n\nChecking or repairing NTFS volumes is not supported\n(by linux-ntfs).\n\n=back\n\nThis command is entirely equivalent to running C."); else if (strcasecmp (cmd, "zero") == 0) pod2text ("zero - write zeroes to the device", " zero \n\nThis command writes zeroes over the first few blocks of C.\n\nHow many blocks are zeroed isn't specified (but it's I enough\nto securely wipe the device). It should be sufficient to remove\nany partition tables, filesystem superblocks and so on."); diff --git a/guestfish-actions.pod b/guestfish-actions.pod index d391257..44d86f2 100644 --- a/guestfish-actions.pod +++ b/guestfish-actions.pod @@ -457,13 +457,30 @@ This runs the filesystem checker (fsck) on C which should have filesystem type C. The returned integer is the status. See L for the -list of status codes from C, and note that multiple -status codes can be summed together. +list of status codes from C. -It is entirely equivalent to running C. -Note that checking or repairing NTFS volumes is not supported +Notes: + +=over 4 + +=item * + +Multiple status codes can be summed together. + +=item * + +A non-zero return code can mean "success", for example if +errors have been corrected on the filesystem. + +=item * + +Checking or repairing NTFS volumes is not supported (by linux-ntfs). +=back + +This command is entirely equivalent to running C. + =head2 get-autosync get-autosync diff --git a/guestfs-actions.pod b/guestfs-actions.pod index fb7c3db..6fc51f0 100644 --- a/guestfs-actions.pod +++ b/guestfs-actions.pod @@ -592,13 +592,30 @@ This runs the filesystem checker (fsck) on C which should have filesystem type C. The returned integer is the status. See L for the -list of status codes from C, and note that multiple -status codes can be summed together. +list of status codes from C. -It is entirely equivalent to running C. -Note that checking or repairing NTFS volumes is not supported +Notes: + +=over 4 + +=item * + +Multiple status codes can be summed together. + +=item * + +A non-zero return code can mean "success", for example if +errors have been corrected on the filesystem. + +=item * + +Checking or repairing NTFS volumes is not supported (by linux-ntfs). +=back + +This command is entirely equivalent to running C. + On error this function returns -1. =head2 guestfs_get_autosync diff --git a/java/com/redhat/et/libguestfs/GuestFS.java b/java/com/redhat/et/libguestfs/GuestFS.java index 293ee23..5b81623 100644 --- a/java/com/redhat/et/libguestfs/GuestFS.java +++ b/java/com/redhat/et/libguestfs/GuestFS.java @@ -2363,12 +2363,21 @@ public class GuestFS { * which should have filesystem type "fstype". * * The returned integer is the status. See fsck(8) for the - * list of status codes from "fsck", and note that multiple - * status codes can be summed together. + * list of status codes from "fsck". * - * It is entirely equivalent to running "fsck -a -t fstype - * device". Note that checking or repairing NTFS volumes is - * not supported (by linux-ntfs). + * Notes: + * + * * Multiple status codes can be summed together. + * + * * A non-zero return code can mean "success", for + * example if errors have been corrected on the + * filesystem. + * + * * Checking or repairing NTFS volumes is not supported + * (by linux-ntfs). + * + * This command is entirely equivalent to running "fsck -a + * -t fstype device". * * @throws LibGuestFSException */ diff --git a/perl/lib/Sys/Guestfs.pm b/perl/lib/Sys/Guestfs.pm index 2d75b69..bab7887 100644 --- a/perl/lib/Sys/Guestfs.pm +++ b/perl/lib/Sys/Guestfs.pm @@ -474,13 +474,30 @@ This runs the filesystem checker (fsck) on C which should have filesystem type C. The returned integer is the status. See L for the -list of status codes from C, and note that multiple -status codes can be summed together. +list of status codes from C. -It is entirely equivalent to running C. -Note that checking or repairing NTFS volumes is not supported +Notes: + +=over 4 + +=item * + +Multiple status codes can be summed together. + +=item * + +A non-zero return code can mean "success", for example if +errors have been corrected on the filesystem. + +=item * + +Checking or repairing NTFS volumes is not supported (by linux-ntfs). +=back + +This command is entirely equivalent to running C. + =item $autosync = $h->get_autosync (); Get the autosync flag. diff --git a/python/guestfs.py b/python/guestfs.py index 3cfc86a..022150b 100644 --- a/python/guestfs.py +++ b/python/guestfs.py @@ -1154,12 +1154,21 @@ class GuestFS: which should have filesystem type "fstype". The returned integer is the status. See fsck(8) for the - list of status codes from "fsck", and note that multiple - status codes can be summed together. + list of status codes from "fsck". - It is entirely equivalent to running "fsck -a -t fstype - device". Note that checking or repairing NTFS volumes is - not supported (by linux-ntfs). + Notes: + + * Multiple status codes can be summed together. + + * A non-zero return code can mean "success", for + example if errors have been corrected on the + filesystem. + + * Checking or repairing NTFS volumes is not supported + (by linux-ntfs). + + This command is entirely equivalent to running "fsck -a + -t fstype device". """ return libguestfsmod.fsck (self._o, fstype, device) diff --git a/src/generator.ml b/src/generator.ml index 8d5450d..04445ee 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -1646,12 +1646,29 @@ This runs the filesystem checker (fsck) on C which should have filesystem type C. The returned integer is the status. See L for the -list of status codes from C, and note that multiple -status codes can be summed together. +list of status codes from C. -It is entirely equivalent to running C. -Note that checking or repairing NTFS volumes is not supported -(by linux-ntfs)."); +Notes: + +=over 4 + +=item * + +Multiple status codes can be summed together. + +=item * + +A non-zero return code can mean \"success\", for example if +errors have been corrected on the filesystem. + +=item * + +Checking or repairing NTFS volumes is not supported +(by linux-ntfs). + +=back + +This command is entirely equivalent to running C."); ("zero", (RErr, [String "device"]), 85, [], [InitBasicFS, TestOutput ( -- 1.8.3.1