search for: part_get_disk_guid

Displaying 10 results from an estimated 10 matches for "part_get_disk_guid".

2016 Jan 19
0
[PATCHv2 1/3] New API: part_get_disk_guid and part_set_disk_guid.
...1 deletion(-) diff --git a/daemon/parted.c b/daemon/parted.c index b073bd8..40f9676 100644 --- a/daemon/parted.c +++ b/daemon/parted.c @@ -928,3 +928,63 @@ do_part_get_mbr_part_type (const char *device, int partnum) reply_with_error ("strdup failed"); return NULL; } + +char * +do_part_get_disk_guid (const char *device) +{ + const char *pattern = "Disk identifier (GUID):"; + size_t i; + + CLEANUP_FREE char *err = NULL; + int r = commandf (NULL, &err, COMMAND_FLAG_FOLD_STDOUT_ON_STDERR, + str_sgdisk, device, "-p", NULL); + if (r == -1) { + repl...
2016 Jan 18
1
[PATCH] New API: part_get_disk_guid and part_set_disk_guid.
...1 deletion(-) diff --git a/daemon/parted.c b/daemon/parted.c index b073bd8..40f9676 100644 --- a/daemon/parted.c +++ b/daemon/parted.c @@ -928,3 +928,63 @@ do_part_get_mbr_part_type (const char *device, int partnum) reply_with_error ("strdup failed"); return NULL; } + +char * +do_part_get_disk_guid (const char *device) +{ + const char *pattern = "Disk identifier (GUID):"; + size_t i; + + CLEANUP_FREE char *err = NULL; + int r = commandf (NULL, &err, COMMAND_FLAG_FOLD_STDOUT_ON_STDERR, + str_sgdisk, device, "-p", NULL); + if (r == -1) { + repl...
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.
...6 +407,13 @@ read the man page virt-resize(1). error (f_"%s: unknown partition table type\nvirt-resize only supports MBR (DOS) and GPT partition tables.") (fst infile) in + let disk_guid = + match parttype with + | MBR -> None + | GPT -> + try Some (g#part_get_disk_guid "/dev/sda") + with G.Error _ -> None in + (* Build a data structure describing the source disk's partition layout. *) let get_partition_content = let pvs_full = Array.to_list (g#pvs_full ()) in @@ -977,7 +984,10 @@ read the man page virt-resize(1). let last_err...
2016 Aug 08
0
ANNOUNCE: libguestfs 1.34 released
...t;ntfscat_i" Download 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....
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 May 04
4
[PATCH 0/3] generator: Allow returned strings to be annotated as devices.
If we want to permit more than 255 drives to be added, then we will have to add the disks to the same virtio-scsi target using different unit (LUN) numbers. Unfortunately SCSI LUN enumeration in the Linux is not deterministic (eg. two disks with target=0, lun=[0,1] can be enumerated as /dev/sda or /dev/sdb randomly). Dealing with that will require some very complex device name translation on the
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.
...+ style = RErr, [String (Device, "device"); String (GUID, "guid")], []; optional = Some "gdisk"; tests = [ InitGPT, Always, TestLastFail ( @@ -9479,7 +9479,7 @@ or if C<guid> is not a valid GUID." }; { defaults with name = "part_get_disk_guid"; added = (1, 33, 2); - style = RString "guid", [Device "device"], []; + style = RString "guid", [String (Device, "device")], []; optional = Some "gdisk"; tests = [ InitGPT, Always, TestResultString ( @@ -9495,7 +9495,7 @...
2017 Apr 21
4
[PATCH 0/2] generator: Simplify the handling of string parameters.
Very large but mechanical change to the generator. Rich.