ports/99712: [MAINTAINER] sysutils/e2fsprogs: update & document fsck_ext2fs

Matthias Andree matthias.andree at gmx.de
Sun Jul 2 12:10:37 UTC 2006


>Number:         99712
>Category:       ports
>Synopsis:       [MAINTAINER] sysutils/e2fsprogs: update & document fsck_ext2fs
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jul 02 12:10:20 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Matthias Andree
>Release:        FreeBSD 6.1-STABLE i386
>Organization:
>Environment:
System: FreeBSD rho.emma.line.org 6.1-STABLE FreeBSD 6.1-STABLE #23: Thu Jun 29 13:56:02 CEST 2006
>Description:
2006-07-02  Matthias Andree <matthias.andree at gmx.de>
	* fsck_ext2fs.8 (1.3): Reformat long lines.
	* fsck_ext2fs.8 (1.2): Add copyright notice and license.  Change -
	to \- where appropriate.  Add Id and FreeBSD keywords for ident.
	* fsck_ext2fs.c (1.6): Update license.
	* fsck_ext2fs.8 (1.1): Add a manual page.
	* fsck_ext2fs.c (1.5): When run with -F, do not report 'unknown
	option'.

Added file(s):
- files/fsck_ext2fs.8

Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:

--- e2fsprogs-1.39_1.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/sysutils/e2fsprogs/Makefile /usr/home/emma/ports/sysutils/e2fsprogs/Makefile
--- /usr/ports/sysutils/e2fsprogs/Makefile	Mon Jun 12 14:13:08 2006
+++ /usr/home/emma/ports/sysutils/e2fsprogs/Makefile	Sun Jul  2 13:35:32 2006
@@ -7,7 +7,7 @@
 
 PORTNAME=	e2fsprogs
 PORTVERSION=	1.39
-PORTREVISION?=	0
+PORTREVISION?=	1
 CATEGORIES?=	sysutils
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE_EXTENDED}
 MASTER_SITE_SUBDIR=	${PORTNAME}
@@ -41,7 +41,7 @@
 MAN8=	badblocks.8 debugfs.8 dumpe2fs.8 e2fsck.8 e2image.8 e2label.8 \
 	mke2fs.8 mklost+found.8 resize2fs.8 tune2fs.8 \
 	fsck.ext2.8 fsck.ext3.8 mkfs.ext2.8 mkfs.ext3.8 \
-	findfs.8 blkid.8 logsave.8
+	findfs.8 blkid.8 logsave.8 fsck_ext2fs.8
 
 pre-build:
 	@${ECHO_CMD} "-------------------------------------------------------------"
@@ -89,6 +89,7 @@
 	${RM} ${PREFIX}/man/man8/filefrag.8
 	${RM} ${PREFIX}/info/libext2fs.info.gz
 	${INSTALL_PROGRAM} ${WRKSRC}/fsck_ext2fs ${PREFIX}/sbin/
+	${INSTALL_MAN} ${FILESDIR}/fsck_ext2fs.8 ${PREFIX}/man/man8/
 	[ -f ${PREFIX}/etc/mke2fs.conf ] || \
 		${CP} -p ${PREFIX}/etc/mke2fs.conf.dist ${PREFIX}/etc/mke2fs.conf
 	@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
diff -ruN --exclude=CVS /usr/ports/sysutils/e2fsprogs/files/fsck_ext2fs.8 /usr/home/emma/ports/sysutils/e2fsprogs/files/fsck_ext2fs.8
--- /usr/ports/sysutils/e2fsprogs/files/fsck_ext2fs.8	Thu Jan  1 01:00:00 1970
+++ /usr/home/emma/ports/sysutils/e2fsprogs/files/fsck_ext2fs.8	Sun Jul  2 13:58:03 2006
@@ -0,0 +1,96 @@
+.TH fsck_ext2fs 8 2006-07-02 "Matthias Andree" "FreeBSD Ports"
+.\"
+.\" fsck_ext2fs.8 - manual page for fsck_ext2fs wrapper
+.\"
+.\" (C) Copyright 2006 by Matthias Andree <matthias.andree at gmx.de>
+.\"
+.\" License: This file may be redistributed in accordance with the terms
+.\" of the GNU General Public License v2.
+.\"
+.\" Upstream $Id: fsck_ext2fs.8,v 1.3 2006/07/02 11:45:21 emma Exp $
+.\" $FreeBSD$
+.\"
+.SH NAME
+.B fsck_ext2fs
+\- compatibility wrapper for e2fsck
+.SH SYNOPSIS
+.P
+.B fsck_ext2fs
+[\fB\-Fpfnyv\fR] [\fB\-b\fR \fIblock\fR]
+.SH DESCRIPTION
+.P
+\fBfsck_ext2fs\fR maps the traditional FreeBSD \fBfsck_ffs\fR options to
+options with the same functionality for \fBe2fsck,\fR runs \fBe2fsck\fR
+and then maps its exit status to values that FreeBSD understands.
+\fBe2fsck\fR is a utility to check and repair ext2 and ext3 file
+systems.
+
+.SH OPTIONS
+.IP \fB\-F\fR
+(check foreground mode required) Immediately exits with status 1 to tell
+\fBfsck\fR that ext2fs cannot be checked in the background. \fBfsck\fR
+usually runs \fBfsck_*\fR programs twice, first with \fB\-F\fR to find
+out if they can do background checking, then either immediately without
+\fB\-F\fR for foreground checking or deferred in the background with
+\fB\-B\fR.
+.IP \fB\-p\fR
+(preen mode) This option suppresses adding the \fB\-f\fR option (unless
+\fB\-f\fR is also given) and adds the \fB\-p\fR option to the
+\fBe2fsck\fR command line. This causes \fBe2fsck\fR to automatically fix
+any filesystem problems that can safely be fixed without operator
+intervention. Without this option given, \fBe2fsck\fR will be run with
+the \fB\-f\fR option to force a check, since interactive scan and repair
+mode is the default on FreeBSD, but not on Linux where \fBe2fsck\fR
+comes from.
+.IP \fB\-f\fR
+(force check) This option forces the check of a clean file system while
+preening and is passed to \fBe2fsck\fR verbatim.
+.IP \fB\-n\fR
+("no" mode) This option causes the file system to be opened in read-only
+mode and assume "no" as answer to all questions. This is the only way to
+safely run \fBfsck\fR on a mounted ext2 or ext3 file system. This option
+is passed to \fBe2fsck\fR verbatim.
+.IP \fB\-y\fR
+("yes" mode) This option is passed verbatim to \fBe2fsck\fR and causes
+it to assume "yes" as answer to all questions. This allows the
+non-interactive use of e2fsck but is rather aggressive. Use with care.
+.IP \fB\-v\fR
+(verbose output) This option is passed verbatim to \fBe2fsck\fR and
+causes it to verbosely report its progress.
+.IP "\fB\-b\fR \fIblock\fR"
+(use alternate super block) This option is passed verbatim to
+\fBe2fsck\fR and selects an alternate super block, for use when the
+primary super block has been damaged. Please see the \fBe2fsck\fR(8)
+manual page for details.
+
+.SH EXIT STATUS
+If errors remain after \fBe2fsck\fR, an invalid option or too many
+options have been specified, \fBe2fsck\fR was killed with a signal or
+the \fIfork\fB system call failed, \fBfsck_ext2fs\fR exits with status
+EXIT_FAILURE (usually 1). If \fBe2fsck\fR cannot be started, exits with
+status 127. If the file system is clean after \fBe2fsck\fR operation,
+exits with status EXIT_SUCCESS (0).
+
+.SH NOTES
+.P
+This utility is merely meant as an adaptor so that \fBe2fsck\fR can be
+run during the boot process, it does not support all options that
+\fBe2fsck\fR offers. If you need one of its advanced options, please run
+\fBe2fsck\fR directly.
+
+.SH FILES
+.TP
+.I /sbin/e2fsck
+is the location of the \fBe2fsck\fR program to run.
+
+.SH AUTHOR
+.P
+Matthias Andree <matthias.andree at gmx.de> wrote the program and this
+manual page.
+.SH CONFORMING TO
+The FreeBSD 6.1 command line interface for \fBfsck_ufs\fR(8).
+.SH SEE ALSO
+.BR fsck (8),
+.BR e2fsck (8)
+and
+.BR fsck_ufs (8).
diff -ruN --exclude=CVS /usr/ports/sysutils/e2fsprogs/files/fsck_ext2fs.c /usr/home/emma/ports/sysutils/e2fsprogs/files/fsck_ext2fs.c
--- /usr/ports/sysutils/e2fsprogs/files/fsck_ext2fs.c	Fri Mar 26 09:43:20 2004
+++ /usr/home/emma/ports/sysutils/e2fsprogs/files/fsck_ext2fs.c	Sun Jul  2 13:45:10 2006
@@ -1,12 +1,12 @@
 /*
  * fsck_ext2fs - wrapper for e2fsck on FreeBSD
- * Copyright (C) 2004 Matthias Andree
+ * Copyright (C) 2004,2006 Matthias Andree <matthias.andree at gmx.de>
  * redistributable in accordance with the
  * GNU General Public License v2
  *
  * $FreeBSD: ports/sysutils/e2fsprogs/files/fsck_ext2fs.c,v 1.4 2004/03/26 08:43:20 krion Exp $
  *
- * Upstream: $Id: fsck_ext2fs.c,v 1.4 2004/03/20 15:51:01 emma Exp $
+ * Upstream: $Id: fsck_ext2fs.c,v 1.6 2006/07/02 11:37:49 emma Exp $
  *
  * format: gindent -kr
  */
@@ -57,8 +57,12 @@
 		case 'v':
 			verbose++;
 			break;
-		case 'B':
 		case 'F':
+			/* e2fsck does not support background checking,
+			 * hence exit with nonzero status to force
+			 * the foreground check. */
+			exit(1);
+		case 'B':
 		default:
 			fprintf(stderr, "%s: unknown option -%c\n",
 				argv[0], optopt);
--- e2fsprogs-1.39_1.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list