fsfreeze: remove unnecessary functions
PATCH 1/2 fsfreeze: remove unnecessary functions
Signed-off-by Sami Kerola <[email protected]>
--- sys-utils/fsfreeze.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-)
sys-utils/fsfreeze.c +2 -12
@@ -33,16 +33,6 @@ enum fs_operation { UNFREEZE }; -static int freeze_f (int fd) -{ -return ioctl (fd,FIFREEZE ,0 ); -} - -static int unfreeze_f (int fd) -{ -return ioctl (fd,FITHAW ,0 ); -} -static void __attribute__((__noreturn__))usage (FILE *out) {fprintf (out,USAGE_HEADER );
@@ -139,13 +129,13 @@ int main(int argc, char **argv)switch (action) {case FREEZE : -if (freeze_f (fd)) { +if (ioctl (fd,FIFREEZE ,0 )) {warn (_ ("%s: freeze failed" ), path); goto done; }break ;case UNFREEZE : -if (unfreeze_f (fd)) { +if (ioctl (fd,FITHAW ,0 )) {warn (_ ("%s: unfreeze failed" ), path); goto done; }
Signature · 1 line
2.11.0
PATCH 2/2 fsfreeze: move filesystem support info to manual page
Include btrfs, f2fs, and nilfs to list of supported filesystems, with note the list can be incomplete.
Signed-off-by Sami Kerola <[email protected]>
--- sys-utils/fsfreeze.8 | 14 ++++++++++++++ sys-utils/fsfreeze.c | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-)
sys-utils/fsfreeze.8 +14 -0
@@ -61,6 +61,20 @@ Display version information and exit. .TP .BR \-h , " \-\-help" Display help text and exit. +.SH FILESYSTEM SUPPORT +This command will work only if filesystem supports has support for freezing. +List of these filesystems include (2016-12-18) +.BR btrfs , +.BR ext2/3/4 , +.BR f2fs , +.BR jfs , +.BR nilfs2 , +.BR reiserfs , +and +.BR xfs . +Previous list may be incomplete, as more filesystems get support. If in +doubt easiest way to know if a filesystem has support is create a small +loopback mount and test freezing it. .SH AUTHOR .PP Written by Hajime Taira.
sys-utils/fsfreeze.c +1 -1
@@ -40,7 +40,7 @@ static void __attribute__((__noreturn__)) usage(FILE *out) _(" %s [options] <mountpoint>\n"), program_invocation_short_name);fputs (USAGE_SEPARATOR , out); -fputs (_ ("Suspend access to a filesystem (ext3/4, ReiserFS, JFS, XFS).\n" ), out); +fputs (_ ("Suspend access to a filesystem.\n" ), out);fputs (USAGE_OPTIONS , out);fputs (_ (" -f, --freeze freeze the filesystem\n" ), out);
Signature · 1 line
2.11.0
Karel Zak
maintainersys-utils/fsfreeze.c
Quoted 4 lines · Sami Kerola
sys-utils/fsfreeze.c +0
-0
All applied. Thanks.
Karel
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com