#10 use the right fstype for btrfs
Merged 3 years ago by ngompa. Opened 3 years ago by dcavalca.
dcavalca/appliance-tools btrfs  into  master

@@ -110,6 +110,8 @@ 

  

              logging.debug("Add %s part at %d of size %d" % (p['type'], p['start'], p['size']))

              p['originalfstype'] = p['fstype']

+             if p['fstype'] == 'btrfs':

+                 fstype = 'btrfs'

              if p['fstype'].startswith('ext'):

                  fstype = 'ext2'

              if p['fstype'].startswith('swap') or p['mountpoint'].startswith('swap'):
@@ -308,6 +310,7 @@ 

              rmmountdir = False

              if p['mountpoint'] == "/":

                  rmmountdir = True

+             # despite the name, this supports btrfs too

              pdisk = ExtDiskMount(RawDisk(p['size'] * 1024 * 1024, p['device']),

                                   self.mountdir + p['mountpoint'],

                                   p['fstype'],

Make it clear that this should make a btrfs partition. Note that this isn't strictly necessary, as it seems to still work for some reason, but I'd rather have explicit logic here.

Pull-Request has been merged by ngompa

3 years ago
Metadata