From deed4a3d6c082eb5fe7b6602c059e8735fc97d42 Mon Sep 17 00:00:00 2001 From: Luflosi Date: Tue, 3 May 2022 16:15:51 +0200 Subject: [PATCH] nixos/stage-1: remove dead code This special case for Btrfs was added in 51bc82960a23d2db786465f2deb709276ee3fbe8. One year later beddd36c953f98e95164bdff20b0a6ead61ad71c added code to skip the fsck entirely if the filesystem is Btrfs. This made the `if` statement unnecessary. --- nixos/modules/system/boot/stage-1-init.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/nixos/modules/system/boot/stage-1-init.sh b/nixos/modules/system/boot/stage-1-init.sh index 317583669809..22d5ec76af70 100644 --- a/nixos/modules/system/boot/stage-1-init.sh +++ b/nixos/modules/system/boot/stage-1-init.sh @@ -318,11 +318,7 @@ checkFS() { echo "checking $device..." - fsckFlags= - if test "$fsType" != "btrfs"; then - fsckFlags="-V -a" - fi - fsck $fsckFlags "$device" + fsck -V -a "$device" fsckResult=$? if test $(($fsckResult | 2)) = $fsckResult; then