Displaying 12 results from an estimated 12 matches for "part_set_disk_guid".
2016 Jan 19
0
[PATCHv2 1/3] New API: part_get_disk_guid and part_set_disk_guid.
...rn NULL;
+ }
+
+ return ret;
+ }
+ }
+
+ /* If we got here it means we didn't find the field */
+ reply_with_error ("sgdisk output did not contain disk GUID. "
+ "See LIBGUESTFS_DEBUG output for more details");
+ return NULL;
+}
+
+int
+do_part_set_disk_guid (const char *device, const char *guid)
+{
+ CLEANUP_FREE char *err = NULL;
+ int r = commandf (NULL, &err, COMMAND_FLAG_FOLD_STDOUT_ON_STDERR,
+ str_sgdisk, device, "-U", guid, NULL);
+
+ if (r == -1) {
+ reply_with_error ("%s %s -U %s: %s", str_sgdi...
2016 Jan 18
1
[PATCH] New API: part_get_disk_guid and part_set_disk_guid.
...rn NULL;
+ }
+
+ return ret;
+ }
+ }
+
+ /* If we got here it means we didn't find the field */
+ reply_with_error ("sgdisk output did not contain disk GUID. "
+ "See LIBGUESTFS_DEBUG output for more details");
+ return NULL;
+}
+
+int
+do_part_set_disk_guid (const char *device, const char *guid)
+{
+ CLEANUP_FREE char *err = NULL;
+ int r = commandf (NULL, &err, COMMAND_FLAG_FOLD_STDOUT_ON_STDERR,
+ str_sgdisk, device, "-U", guid, NULL);
+
+ if (r == -1) {
+ reply_with_error ("%s %s -U %s: %s", str_sgdi...
2016 Jan 19
4
[PATCHv2 0/3] Get/set disk GPT GUID API and support in virt-resize.
Some OSes (e.g. Windows Server 2012 R2) fail to boot after virt-resize
due to changed disk guid. To fix it, we add new APIs:
part_get_disk_guid
part_set_disk_guid
part_set_disk_guid_random
We also preserve disk GUID in virt-resize.
Maxim Perevedentsev (3):
New API: part_get_disk_guid and part_set_disk_guid.
New API: part_set_disk_guid_random.
resize: preserve GPT disk GUID.
daemon/parted.c | 75 +++++++++++++++++++++++++++++++++++++++++++++++++...
2016 Jan 19
0
[PATCHv2 3/3] resize: preserve GPT disk GUID.
...the man page virt-resize(1).
let last_error = ref "" in
let rec initialize_partition_table g attempts =
let ok =
- try g#part_init "/dev/sdb" parttype_string; true
+ try
+ g#part_init "/dev/sdb" parttype_string;
+ may (g#part_set_disk_guid "/dev/sdb") disk_guid;
+ true
with G.Error error -> last_error := error; false in
if ok then g, true
else if attempts > 0 then (
--
1.8.3.1
2017 Oct 08
0
[PATCH v2 3/4] common/mlstdutils: Introduce Option submodule.
...ge. *)
diff --git a/resize/resize.ml b/resize/resize.ml
index 4eeb0a170..837c3ce9e 100644
--- a/resize/resize.ml
+++ b/resize/resize.ml
@@ -1005,7 +1005,7 @@ read the man page virt-resize(1).
let ok =
try
g#part_init "/dev/sdb" parttype_string;
- may (g#part_set_disk_guid "/dev/sdb") disk_guid;
+ Option.may (g#part_set_disk_guid "/dev/sdb") disk_guid;
true
with G.Error error -> last_error := error; false in
if ok then g, true
@@ -1195,8 +1195,8 @@ read the man page virt-resize(1).
if p.p_bootable then...
2016 Aug 08
0
ANNOUNCE: libguestfs 1.34 released
...NTFS file by inode number (Matteo Cafasso).
"part_expand_gpt"
Allow in-place expanding of GPT partitions by moving the second
(backup) partition table to the end of the disk (Maxim
Perevedentsev).
"part_get_disk_guid"
"part_set_disk_guid"
"part_set_disk_guid_random"
Get and set the GPT disk GUID, or set it to a fresh random value
(Maxim Perevedentsev).
"selinux_relabel"
SELinux-relabel part or all of the guest filesystem.
Other API changes
"...
2017 Oct 08
4
[PATCH 0/3] common/mlstdutils: Add Std_utils List and Option modules.
In Std_utils we already extend Char and String. These commits take it
a little further by extending List and adding a new Option submodule.
All basically simple refactoring.
Rich.
2017 Oct 08
7
[[PATCH v2 0/4] common/mlstdutils: Add Std_utils List and Option modules.
This time including the first commit ...
2017 Feb 21
1
[PATCH] generator: Put all the daemon procedure numbers (proc_nr)
This is a follow-up to the other generator changes in:
https://www.redhat.com/archives/libguestfs/2017-February/msg00217.html
Rich.
2017 Feb 18
8
[PATCH 0/6] generator: Split up generator/actions.ml
Split up the huge generator/actions.ml into several smaller files.
Rich.
2017 Apr 21
0
[PATCH 1/2] generator: Simplify the handling of string parameters.
..."group")], [];
visibility = VInternal;
shortdesc = "test availability of some parts of the API";
longdesc = "\
@@ -9460,7 +9460,7 @@ This is the internal call which implements C<guestfs_feature_available>." };
{ defaults with
name = "part_set_disk_guid"; added = (1, 33, 2);
- style = RErr, [Device "device"; GUID "guid"], [];
+ style = RErr, [String (Device, "device"); String (GUID, "guid")], [];
optional = Some "gdisk";
tests = [
InitGPT, Always, TestLastFail (
@@ -9479...
2017 Apr 21
4
[PATCH 0/2] generator: Simplify the handling of string parameters.
Very large but mechanical change to the generator.
Rich.