2020-04-19 13:06:12 +00:00
|
|
|
From: Anna Maresova <anicka@suse.cz>
|
|
|
|
Date: Wed Mar 25 18:17:28 CET 2020
|
|
|
|
Subject: parted: print maximum number of partitions for yast
|
|
|
|
Patch-mainline: no, custom SUSE patch
|
|
|
|
|
|
|
|
Index: parted-3.3/parted/parted.c
|
|
|
|
===================================================================
|
|
|
|
--- parted-3.3.orig/parted/parted.c
|
|
|
|
+++ parted-3.3/parted/parted.c
|
|
|
|
@@ -1125,10 +1125,13 @@ _print_disk_info (const PedDevice *dev,
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
- printf ("%s:%s:%s:%lld:%lld:%s:%s:%s;\n",
|
|
|
|
+ printf ("%s:%s:%s:%lld:%lld:%s:%s:%s",
|
2022-04-21 05:58:32 +00:00
|
|
|
escaped_path, end, transport[dev->type],
|
2020-04-19 13:06:12 +00:00
|
|
|
dev->sector_size, dev->phys_sector_size,
|
2022-04-21 05:58:32 +00:00
|
|
|
pt_name, escaped_model, disk_flags);
|
2020-04-19 13:06:12 +00:00
|
|
|
+ if (getenv("PARTED_PRINT_NUMBER_OF_PARTITION_SLOTS"))
|
|
|
|
+ printf(":%lld", diskp && diskp->type->ops->get_max_primary_partition_count ? diskp->type->ops->get_max_primary_partition_count(diskp) : 0);
|
|
|
|
+ printf(";\n");
|
2022-04-21 05:58:32 +00:00
|
|
|
free (escaped_path);
|
|
|
|
free (escaped_model);
|
|
|
|
} else if (opt_output_mode == JSON) {
|