Displaying 8 results from an estimated 8 matches for "do_part_set_gpt_type".
Did you mean:
do_part_get_gpt_type
2015 Feb 05
5
resize: Preserve GPT GUID so we don't break EFI bootloaders (RHBZ#1189284)
virt-resize didn't preserve the per-partition GPT GUID.
Now that guests using UEFI are becoming common (basically it's the
default on aarch64) we need to take into account that sometimes the
partition GUID is used by the bootloader NVRAM variables to identify
the boot partition, so it must be preserved across resize.
This bug caused the 'virt-builder --size' option to fail on
2014 Feb 04
0
[PATCH 1/3] daemon: parted: refactor sgdisk info parsing code
...actual behaviour changes.
---
daemon/parted.c | 53 +++++++++++++++++++++++++++++++++++++----------------
1 file changed, 37 insertions(+), 16 deletions(-)
diff --git a/daemon/parted.c b/daemon/parted.c
index bd81986..5282adb 100644
--- a/daemon/parted.c
+++ b/daemon/parted.c
@@ -784,8 +784,9 @@ do_part_set_gpt_type(const char *device, int partnum, const char *guid)
return 0;
}
-char *
-do_part_get_gpt_type(const char *device, int partnum)
+static char *
+sgdisk_info_extract_field (const char *device, int partnum, const char *field,
+ char *(*extract) (const char *path))
{
i...
2012 Dec 14
1
[PATCH] Add support for getting and setting GPT partition type GUIDs
...n/parted.c
+++ b/daemon/parted.c
@@ -30,6 +30,7 @@
GUESTFSD_EXT_CMD(str_parted, parted);
GUESTFSD_EXT_CMD(str_sfdisk, sfdisk);
+GUESTFSD_EXT_CMD(str_sgdisk, sgdisk);
/* Notes:
*
@@ -802,3 +803,131 @@ do_part_set_mbr_id (const char *device, int partnum, int idbyte)
return 0;
}
+
+int
+do_part_set_gpt_type(const char *device, int partnum, const char *guid)
+{
+ if (partnum <= 0) {
+ reply_with_error ("partition number must be >= 1");
+ return -1;
+ }
+
+ char *typecode = NULL;
+ if (asprintf (&typecode, "%i:%s", partnum, guid) == -1) {
+ reply_with_perror (&...
2014 Feb 04
6
[PATCH 0/3] virt-resize: preserve GPT partitions label
Hi,
attached there are few patches to implement a way to get the label of
GPT partitions (refactoring an existing function and adding a new
daemon API) and using it in virt-resize to restore them when copying
partitions.
Thanks,
Pino Toscano (3):
daemon: parted: refactor sgdisk info parsing code
New API: part-get-name (RHBZ#593511).
resize: preserve GPT partition names (RHBZ#1060404).
2017 Jul 27
0
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
...reply_with_error ("sfdisk %s: %s", param, err);
@@ -600,7 +596,7 @@ do_part_set_mbr_id (const char *device, int partnum, int idbyte)
int
optgroup_gdisk_available (void)
{
- return prog_exists (str_sgdisk);
+ return prog_exists ("sgdisk");
}
int
@@ -619,10 +615,10 @@ do_part_set_gpt_type (const char *device, int partnum, const char *guid)
CLEANUP_FREE char *err = NULL;
int r = commandf (NULL, &err, COMMAND_FLAG_FOLD_STDOUT_ON_STDERR,
- str_sgdisk, device, "-t", typecode, NULL);
+ "sgdisk", device, "-t",...
2017 Jul 24
0
[PATCH 2/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
...reply_with_error ("sfdisk %s: %s", param, err);
@@ -600,7 +598,7 @@ do_part_set_mbr_id (const char *device, int partnum, int idbyte)
int
optgroup_gdisk_available (void)
{
- return prog_exists (str_sgdisk);
+ return prog_exists ("sgdisk");
}
int
@@ -619,10 +617,10 @@ do_part_set_gpt_type (const char *device, int partnum, const char *guid)
CLEANUP_FREE char *err = NULL;
int r = commandf (NULL, &err, COMMAND_FLAG_FOLD_STDOUT_ON_STDERR,
- str_sgdisk, device, "-t", typecode, NULL);
+ "sgdisk", device, "-t",...
2017 Jul 27
3
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
This is a simpler patch that removes GUESTFSD_EXT_CMD completely.
2017 Jul 24
6
[PATCH 0/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
Replace GUESTFSD_EXT_CMD with a command line option
‘./guestfsd --print-external-commands’