From owner-freebsd-doc@FreeBSD.ORG Sun May 25 05:20:03 2014 Return-Path: Delivered-To: freebsd-doc@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 56A9DCDD for ; Sun, 25 May 2014 05:20:03 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4451A2E15 for ; Sun, 25 May 2014 05:20:03 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s4P5K3RH029438 for ; Sun, 25 May 2014 05:20:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s4P5K3h4029437; Sun, 25 May 2014 05:20:03 GMT (envelope-from gnats) Date: Sun, 25 May 2014 05:20:03 GMT Message-Id: <201405250520.s4P5K3h4029437@freefall.freebsd.org> To: freebsd-doc@FreeBSD.org Cc: From: Tom Rhodes Subject: Re: docs/188214: Manpage for fsck(8) doesn't say what happens when no -t or -T Reply-To: Tom Rhodes X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 May 2014 05:20:03 -0000 The following reply was made to PR docs/188214; it has been noted by GNATS. From: Tom Rhodes To: Benjamin Kaduk Cc: trhodes@freebsd.org, allanjude@freebsd.org, bug-followup@freebsd.org Subject: Re: docs/188214: Manpage for fsck(8) doesn't say what happens when no -t or -T Date: Sun, 25 May 2014 01:16:52 -0400 Hi Benjamin, On Sat, 24 May 2014 17:42:47 -0400 (EDT) Benjamin Kaduk wrote: > On Sat, 24 May 2014, Tom Rhodes wrote: > > > So, in theory, an attempt to parse /etc/fstab would be > > an attempt to detect the type; however, my quick glance > > at the code showed no real parsing of fstab. But in > > my case, I followed to both the T and t flags, and just > > glanced at what was done would they not be specified. > > That was really as far as I got, and I attempted to use > > very generic language in case it only does one, or the > > other, or both. :) > > When passed no device or path arguments, fsck just checks everything from > the fstab; that's not very interesting for this question. > > Given a path argument and no type argument to use, fstab is parsed using > getfsfile() or getfsspec() around line 204 of fsck.c. This will fail > (well, barring special circumstances) if the argument is instead a device > name. > > Given a device name argument and no type argument to use, after the fstab > check above, fsck opens the device and uses ioctl() to get the disklabel > and does some magic to grab the fstype from it. (See getfslab(), in > fsck.c) > > > So, I think there is a fair bit of autodetection that is attempted. Thanks for the deep dive - I was going to revisit this later (i.e.: actually step through the code more) if there was a real issue. Thanks for saving me the time! :) -- Tom Rhodes