Commits

Leslie P. Polzer  committed 41ba075

parted 1.9.0 uses a different filesystem type name for swap partitions.
For backward and forward compatibility, it's best to simply test whether
the type name starts with "linux-swap".

Patch by Colin Watson.

  • Participants
  • Parent commits 389fbff

Comments (0)

Files changed (1)

 			ped_device_begin_external_access((*disk)->dev);
 			char *type = (char *)ped_partition_type_get_name (part->type);
 			if (part->fs_type
-				&& !strcmp (part->fs_type->name, "linux-swap"))
+				&& !strncmp (part->fs_type->name, "linux-swap", 10))
 				printf ("%+4s %+21s ", _("82"), _("Linux Swap / Solaris"));
 			else if (is_bsd_partition ((*disk)->dev->path,
 				part->geom.start * sect_size, sect_size))