summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian C. Lane <bcl@redhat.com>2022-05-13 10:02:06 -0700
committerBrian C. Lane <bcl@redhat.com>2022-05-13 10:33:11 -0700
commit9b0a83a747b28bd1b778bdd32616e6f7ea88c84d (patch)
treed1067e6b4c54d1092b3725b5ac33097b6903ff15
parent29ffc6a1f285f48ac0b9efa7299373e486c486e8 (diff)
downloadparted-9b0a83a747b28bd1b778bdd32616e6f7ea88c84d.tar.gz
parted: Reset the filesystem type when changing the id/uuid
Without this the print command keeps showing the type selected with mkpart, which doesn't match the id/uuid set by the user. So rescan the partition for a filesystem.
-rw-r--r--parted/parted.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/parted/parted.c b/parted/parted.c
index b8a4acf..96da30d 100644
--- a/parted/parted.c
+++ b/parted/parted.c
@@ -991,6 +991,9 @@ do_type (PedDevice** dev, PedDisk** diskp)
free (input);
+ // Reset the fs_type based on the filesystem, if it exists
+ part->fs_type = ped_file_system_probe (&part->geom);
+
if (!ped_disk_commit (*diskp))
goto error;
return 1;