From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Kent Subject: Re: [autofs4 patch] fix e2fsck error checking Date: Thu, 09 Nov 2006 11:26:44 +0800 Message-ID: <1163042804.4475.3.camel@localhost> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: autofs-bounces@linux.kernel.org Errors-To: autofs-bounces@linux.kernel.org To: Jeff Moyer Cc: autofs mailing list On Wed, 2006-11-08 at 22:18 -0500, Jeff Moyer wrote: > Hi, Ian, list, > > The patch is pretty self-explanatory. Comments are welcome, as always. > I sent this a while back, too. I have not re-tested it since then. > > -Jeff > > > diff --git a/modules/mount_ext2.c b/modules/mount_ext2.c > index b2efb96..a7f008f 100644 > --- a/modules/mount_ext2.c > +++ b/modules/mount_ext2.c > @@ -99,7 +99,13 @@ #endif > err = spawnl(LOG_DEBUG, fsck_prog, fsck_prog, "-p", what, NULL); > } > > - if (err & ~6) { > + /* > + * spawnl returns the error code, left shifted by 8 bits. We are I thought I checked this and concluded it wasn't actually the case. I'll check it again. > + * interested in the following error bits from the fsck program: > + * 2 - File system errors corrected, system should be rebooted > + * 4 - File system errors left uncorrected > + */ > + if ((err >> 8) & 6) { > error(MODPREFIX "%s: filesystem needs repair, won't mount", > what); > return 1;