util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* fsck silently exits when fstype-specific fsck is not found
@ 2020-12-29 19:18 Chris Hofstaedtler
  2021-01-05 12:07 ` Karel Zak
  0 siblings, 1 reply; 2+ messages in thread
From: Chris Hofstaedtler @ 2020-12-29 19:18 UTC (permalink / raw)
  To: util-linux

Hi,

I just noticed that fsck, when given a single device name, silently
exits when it cannot find an appropriate fsck.%s program.

Example:
  (/dev/sda1 is an EFI System Partition, so type=vfat)
  # fsck -V /dev/sda1
  fsck from util-linux 2.36.1
  # echo $?
  0

Note that it also does not warn about fsck.vfat not being found or
anything really.

This appears because fsck.c has a "really_wanted" list of fstypes;
anything not in there gets the mentioned behaviour.

I find this to be very surprising. What are the reasons for this?

I could try changing this code path, but I'm not sure if this is
expected in the first place?

Thanks,
Chris


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: fsck silently exits when fstype-specific fsck is not found
  2020-12-29 19:18 fsck silently exits when fstype-specific fsck is not found Chris Hofstaedtler
@ 2021-01-05 12:07 ` Karel Zak
  0 siblings, 0 replies; 2+ messages in thread
From: Karel Zak @ 2021-01-05 12:07 UTC (permalink / raw)
  To: Chris Hofstaedtler; +Cc: util-linux

On Tue, Dec 29, 2020 at 08:18:14PM +0100, Chris Hofstaedtler wrote:
> Hi,
> 
> I just noticed that fsck, when given a single device name, silently
> exits when it cannot find an appropriate fsck.%s program.
> 
> Example:
>   (/dev/sda1 is an EFI System Partition, so type=vfat)
>   # fsck -V /dev/sda1
>   fsck from util-linux 2.36.1
>   # echo $?
>   0
> 
> Note that it also does not warn about fsck.vfat not being found or
> anything really.
> 
> This appears because fsck.c has a "really_wanted" list of fstypes;
> anything not in there gets the mentioned behaviour.
> 
> I find this to be very surprising. What are the reasons for this?

I guess to avoid unnecessary warnings on systems with filesystems
where fsck is not (or wasn't) implemented like btrfs or xfs.

> I could try changing this code path, but I'm not sure if this is
> expected in the first place?

Maybe we can introduce some another list of filesystems where fsck is
optional and recommended, but it's no error when not available -- it
means print warning, but do not exit with an error.

  Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-05 12:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-29 19:18 fsck silently exits when fstype-specific fsck is not found Chris Hofstaedtler
2021-01-05 12:07 ` Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).