parted/parted-print-max-partitions-for-yast.patch
Marcus Meissner 150f659587 Accepting request 792521 from home:anicka:branches:Base:System
- print maximum number of partitions for yast
  (bsc#1168756, bsc#1161783) 
 - add parted-print-max-partitions-for-yast.patch
- make parted work with pmemXs devices (bsc#1164260)
 - add libparted-linux-pmem-path.patch

OBS-URL: https://build.opensuse.org/request/show/792521
OBS-URL: https://build.opensuse.org/package/show/Base:System/parted?expand=0&rev=145
2020-04-19 13:06:12 +00:00

25 lines
1.0 KiB
Diff

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",
path, end, transport[dev->type],
dev->sector_size, dev->phys_sector_size,
pt_name, dev->model, disk_flags);
+ 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");
free(path);
} else {
printf (_("Model: %s (%s)\n"),