nixos/btrfs: Fix parsing of btrfs subvolume show with btrfsprogs 4.1
				
					
				
			This commit is contained in:
		
							parent
							
								
									b028c14256
								
							
						
					
					
						commit
						08ff83eab3
					
				@ -354,7 +354,7 @@ EOF
 | 
			
		||||
        if ($status != 0 || join("", @msg) =~ /ERROR:/) {
 | 
			
		||||
            die "Failed to retrieve subvolume info for $mountPoint\n";
 | 
			
		||||
        }
 | 
			
		||||
        my @ids = join("", @id_info) =~ m/Object ID:[ \t\n]*([^ \t\n]*)/;
 | 
			
		||||
        my @ids = join("", @id_info) =~ m/Subvolume ID:[ \t\n]*([^ \t\n]*)/;
 | 
			
		||||
        if ($#ids > 0) {
 | 
			
		||||
            die "Btrfs subvol name for $mountPoint listed multiple times in mount\n"
 | 
			
		||||
        } elsif ($#ids == 0) {
 | 
			
		||||
 | 
			
		||||
@ -186,7 +186,7 @@ sub GrubFs {
 | 
			
		||||
                if ($status != 0) {
 | 
			
		||||
                    die "Failed to retrieve subvolume info for @{[$fs->mount]}\n";
 | 
			
		||||
                }
 | 
			
		||||
                my @ids = join("", @id_info) =~ m/Object ID:[ \t\n]*([^ \t\n]*)/;
 | 
			
		||||
                my @ids = join("", @id_info) =~ m/Subvolume ID:[ \t\n]*([^ \t\n]*)/;
 | 
			
		||||
                if ($#ids > 0) {
 | 
			
		||||
                    die "Btrfs subvol name for @{[$fs->device]} listed multiple times in mount\n"
 | 
			
		||||
                } elsif ($#ids == 0) {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user