@@ -33,6 +33,9 @@ def _validate_root_subvol(self) -> None:
3333 detected_subvol = _get_mount_subvol (self , '/' )
3434 except SubvolNotFound :
3535 raise ValueError ("Current root mount is not using a subvolume, but root_subvol is set: %s" % self ['root_subvol' ])
36+ except SubvolIsRoot :
37+ raise ValueError ("Current root mount is not using a subvolume, but root_subvol is set: %s" % self ['root_subvol' ])
38+
3639 if self ['root_subvol' ] != detected_subvol :
3740 raise ValueError ("[%s] Root subvolume does not match detected subvolume: %s" % (self ['root_subvol' ], detected_subvol ))
3841
@@ -60,9 +63,10 @@ def btrfs_scan(self) -> str:
6063 return "btrfs device scan"
6164
6265
63- @check_dict ('root_subvol' , unset = True , log_level = 30 , message = "root_subvol is set, skipping" )
64- @check_dict ('subvol_selector' , value = False , log_level = 20 , message = "subvol_selector enabled, skipping" )
65- @check_dict ('autodetect_root_subvol' , value = True , message = "autodetect_root_subvol not enabled, skipping" )
66+ @check_dict ('root_subvol' , unset = True , log_level = 30 , message = "root_subvol is set, skipping." )
67+ @check_dict ('subvol_selector' , value = False , log_level = 20 , message = "subvol_selector enabled, skipping." )
68+ @check_dict ('autodetect_root_subvol' , value = True , message = "autodetect_root_subvol not enabled, skipping." )
69+ @check_dict ('hostonly' , value = True , message = "hostonly is not set, skipping." )
6670def autodetect_root_subvol (self ):
6771 """ Detects the root subvolume. """
6872 try :
0 commit comments