Displaying 20 results from an estimated 22 matches for "part_set_gpt_attribut".
Did you mean:
part_set_gpt_attributes
2018 Jan 10
0
[PATCH 2/3] New APIs: part_set_gpt_attributes and part_get_gpt_attributes
...parted.ml b/daemon/parted.ml
index cf1a54a08..5f553c2da 100644
--- a/daemon/parted.ml
+++ b/daemon/parted.ml
@@ -124,7 +124,19 @@ let part_get_parttype device =
| _ ->
failwithf "%s: cannot parse the output of parted" device
-let hex_chars = "0123456789ABCDEF"
+let part_set_gpt_attributes device partnum attributes =
+ if partnum <= 0 then failwith "partition number must be >= 1";
+
+ udev_settle ();
+
+ let arg = string_of_int partnum ^ ":=:" ^ attributes in
+ let r, _, err =
+ commandr ~fold_stdout_on_stderr:true
+ "sgdisk" [...
2018 Jan 16
0
[PATCH v3 2/3] New APIs: part_set_gpt_attributes and part_get_gpt_attributes
....ml
index 6fe803613..ce8da8a60 100644
--- a/daemon/parted.ml
+++ b/daemon/parted.ml
@@ -17,6 +17,7 @@
*)
open Scanf
+open Printf
open Std_utils
@@ -124,10 +125,29 @@ let part_get_parttype device =
| _ ->
failwithf "%s: cannot parse the output of parted" device
+let part_set_gpt_attributes device partnum attributes =
+ if partnum <= 0 then failwith "partition number must be >= 1";
+
+ udev_settle ();
+
+ let arg = sprintf "%d:=:%LX" partnum attributes in
+ let r, _, err =
+ commandr ~fold_stdout_on_stderr:true
+ "sgdisk" [ devi...
2018 Jan 15
0
[PATCH v2 2/3] New APIs: part_set_gpt_attributes and part_get_gpt_attributes
...tions(+), 1 deletion(-)
diff --git a/daemon/parted.ml b/daemon/parted.ml
index 6fe803613..e3ab823bd 100644
--- a/daemon/parted.ml
+++ b/daemon/parted.ml
@@ -124,10 +124,30 @@ let part_get_parttype device =
| _ ->
failwithf "%s: cannot parse the output of parted" device
+let part_set_gpt_attributes device partnum attributes =
+ if partnum <= 0 then failwith "partition number must be >= 1";
+
+ udev_settle ();
+
+ let hex = Printf.sprintf "%LX" attributes in
+ let arg = string_of_int partnum ^ ":=:" ^ hex in
+ let r, _, err =
+ commandr ~fold_stdou...
2018 Jan 10
6
[PATCH 0/3] Handle GPT attribute flags
Hi all,
Here is the series fixing the bug I mentioned on IRC regarding the GPT
attribute flags to copy to the new disk in a virt-resize.
Cédric Bosdonnat (3):
daemon: make sgdisk_info_extract_uuid_field more generic
New APIs: part_set_gpt_attributes and part_get_gpt_attributes
resize: copy GPT partition flags
daemon/parted.ml | 34 +++++++++++++++++++++++++++-------
daemon/parted.mli | 3 +++
generator/actions_core.ml | 40 ++++++++++++++++++++++++++++++++++++++++
generator/proc_nr.ml | 2 ++
lib/MAX_PROC_NR...
2018 Jan 15
6
[PATCH v2 0/3] copying gpt attributes
Hi all,
Here is the latest version of the series addressing Pino's comments.
Cédric Bosdonnat (3):
daemon: make sgdisk_info_extract_uuid_field more generic
New APIs: part_set_gpt_attributes and part_get_gpt_attributes
resize: copy GPT partition flags
daemon/parted.ml | 45 +++++++++++++++++++++++++++++++++++----------
daemon/parted.mli | 3 +++
generator/actions_core.ml | 37 +++++++++++++++++++++++++++++++++++++
generator/proc_nr.ml | 2 ++
lib/MAX_PROC_...
2018 Jan 16
4
[PATCH v3 0/3] copy GPT attributes
Hi all,
Here is v3 of the series, taking Richard's comments in account.
Cédric Bosdonnat (3):
daemon: make sgdisk_info_extract_uuid_field more generic
New APIs: part_set_gpt_attributes and part_get_gpt_attributes
resize: copy GPT partition flags
daemon/parted.ml | 45 +++++++++++++++++++++++++++++++++++----------
daemon/parted.mli | 2 ++
generator/actions_core.ml | 37 +++++++++++++++++++++++++++++++++++++
generator/proc_nr.ml | 2 ++
lib/MAX_PROC_N...
2018 Jan 10
0
[PATCH 3/3] resize: copy GPT partition flags
...if p.p_bootable then
g#part_set_bootable "/dev/sdb" p.p_target_partnum true;
Option.may (g#part_set_name "/dev/sdb" p.p_target_partnum) p.p_label;
Option.may (g#part_set_gpt_guid "/dev/sdb" p.p_target_partnum) p.p_guid;
+ Option.may (g#part_set_gpt_attributes "/dev/sdb" p.p_target_partnum) p.p_attributes;
match parttype, p.p_id with
| GPT, GPT_Type gpt_type ->
@@ -1205,7 +1214,7 @@ read the man page virt-resize(1).
g#part_set_mbr_id "/dev/sdb" p.p_target_partnum mbr_id
| GPT, (No_ID|MBR_ID _) | MB...
2018 Jan 15
0
[PATCH v2 3/3] resize: copy GPT partition flags
...if p.p_bootable then
g#part_set_bootable "/dev/sdb" p.p_target_partnum true;
Option.may (g#part_set_name "/dev/sdb" p.p_target_partnum) p.p_label;
Option.may (g#part_set_gpt_guid "/dev/sdb" p.p_target_partnum) p.p_guid;
+ Option.may (g#part_set_gpt_attributes "/dev/sdb" p.p_target_partnum) p.p_attributes;
match parttype, p.p_id with
| GPT, GPT_Type gpt_type ->
@@ -1205,7 +1214,7 @@ read the man page virt-resize(1).
g#part_set_mbr_id "/dev/sdb" p.p_target_partnum mbr_id
| GPT, (No_ID|MBR_ID _) | MB...
2018 Jan 28
0
[PATCH v3 1/3] daemon: Reimplement 'part_get_mbr_part_type' API in OCaml.
..."msdos", (1|2|3|4), (0x05|0x0f) -> "extended"
+ | "msdos", (1|2|3|4), _ -> "primary"
+ | "msdos", _, _ -> "logical"
+ | _, _, _ ->
+ failwithf "part_get_mbr_part_type can only be used on MBR Partitions"
+
let part_set_gpt_attributes device partnum attributes =
if partnum <= 0 then failwith "partition number must be >= 1";
diff --git a/daemon/parted.mli b/daemon/parted.mli
index d547f2f..0f59d29 100644
--- a/daemon/parted.mli
+++ b/daemon/parted.mli
@@ -28,6 +28,8 @@ val part_list : string -> partition...
2018 Jul 18
0
[PATCH 2/3] New API: lvm_scan, deprecate vgscan (RHBZ#1602353).
...k devices and rebuilds the list of LVM
+physical volumes, volume groups and logical volumes." };
+
]
diff --git a/generator/proc_nr.ml b/generator/proc_nr.ml
index ca73aa361..2adf8a32f 100644
--- a/generator/proc_nr.ml
+++ b/generator/proc_nr.ml
@@ -513,6 +513,7 @@ let proc_nr = [
503, "part_set_gpt_attributes";
504, "part_get_gpt_attributes";
505, "f2fs_expand";
+506, "lvm_scan";
]
(* End of list. If adding a new entry, add it at the end of the list
diff --git a/lib/MAX_PROC_NR b/lib/MAX_PROC_NR
index f573e999a..80e3e6eab 100644
--- a/lib/MAX_PROC_NR
+++ b/lib...
2018 Apr 12
4
[PATCH 0/2] Support for expanding f2fs partitions
Hi,
this small patch series exposes one of the utility in f2fs-tools, and
use it to expand f2fs partitions in virt-resize.
Thanks,
Pino Toscano (2):
New API: f2fs_expand
resize: expand f2fs partitions
daemon/Makefile.am | 1 +
daemon/f2fs.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++
generator/actions_core.ml | 9 +++++++++
generator/proc_nr.ml | 1 +
2018 Jan 28
9
guestfs_list_filesystems: skip block devices which cannot hold file system
Initial discussion is here: https://www.redhat.com/archives/libguestfs/2018-January/msg00188.html.
v2 was posted here: https://www.redhat.com/archives/libguestfs/2018-January/msg00246.html.
v3 comparing to v2 is just a rebase with slightly changed commits comments.
2018 Jan 25
2
[PATCH v2 1/3] daemon: Reimplement 'part_get_mbr_part_type' API in OCaml.
..."msdos", (1|2|3|4), (0x05|0x0f) -> "extended"
+ | "msdos", (1|2|3|4), _ -> "primary"
+ | "msdos", _, _ -> "logical"
+ | _, _, _ ->
+ failwithf "part_get_mbr_part_type can only be used on MBR Partitions"
+
let part_set_gpt_attributes device partnum attributes =
if partnum <= 0 then failwith "partition number must be >= 1";
diff --git a/daemon/parted.mli b/daemon/parted.mli
index d547f2f..0f59d29 100644
--- a/daemon/parted.mli
+++ b/daemon/parted.mli
@@ -28,6 +28,8 @@ val part_list : string -> partition...
2018 Apr 27
4
[PATCH v5 0/3] libguestfs: guestfs_list_filesystems: skip block devices which cannot hold file system
This patch series:
1. Addresses comments from last review:
part_get_mbr_part_type doesn't break original implementation in C.
2. Rebased on top of master and little bit refactored for readability.
Mykola Ivanets (1):
tests: md: Test guestfish list-filesystems command skips partitioned
md devices.
Nikolay Ivanets (2):
daemon: Reimplement 'part_get_mbr_part_type' API in
2018 Jul 25
4
[PATCH v2 0/4] New API: lvm_scan, deprecate vgscan (RHBZ#1602353).
v2:
- Changes as suggested by Pino in previous review.
2018 Jul 18
5
[PATCH 0/3] New API: lvm_scan, deprecate vgscan (RHBZ#1602353).
[This email is either empty or too large to be displayed at this time]
2018 Feb 09
0
ANNOUNCE: libguestfs 1.38 released
...guests. Using
the latest "wrestool" is recommended.
API
New APIs
"hivex_value_string"
This replaces the deprecated "hivex_value_utf8" API, but does the
same thing.
"part_get_gpt_attributes"
"part_set_gpt_attributes"
Read and write GPT partition attribute flags (Cédric Bosdonnat).
"part_resize"
Enlarge or shrink an existing partition (Nikos Skalkotos).
"yara_destroy"
"yara_load"
"yara_scan"
Support for...
2018 May 01
9
[PATCH v6 0/7] daemon: list_filesystems: filter out block devices which cannot hold filesystem
This patch series:
1. Addresses comments from v5 series review
2. Large commit is splitted to more granular commits for better code review.
Mykola Ivanets (6):
daemon: Changing the way that we detect if a device contains
partitions.
daemon: list-filesystems: Ignore partitioned MD devices.
tests: list-filesystems command ignores partitioned MD devices.
daemon: list-filesystems: Change
2018 Apr 09
0
[PATCH 3/3] daemon: autogenerate most of OCaml interfaces
...ng -> int -> int
-val part_list : string -> Structs.partition list
-
-val part_get_parttype : string -> string
-
-val part_get_gpt_type : string -> int -> string
-val part_get_gpt_guid : string -> int -> string
-val part_get_gpt_attributes : string -> int -> int64
-val part_set_gpt_attributes : string -> int -> int64 -> unit
diff --git a/daemon/realpath.mli b/daemon/realpath.mli
deleted file mode 100644
index 10b9ae565..000000000
--- a/daemon/realpath.mli
+++ /dev/null
@@ -1,20 +0,0 @@
-(* guestfs-inspection
- * Copyright (C) 2009-2018 Red Hat Inc.
- *
- * This program is fre...
2018 Apr 10
0
[PATCH v2 5/5] daemon: autogenerate OCaml interfaces
...ng -> int -> int
-val part_list : string -> Structs.partition list
-
-val part_get_parttype : string -> string
-
-val part_get_gpt_type : string -> int -> string
-val part_get_gpt_guid : string -> int -> string
-val part_get_gpt_attributes : string -> int -> int64
-val part_set_gpt_attributes : string -> int -> int64 -> unit
diff --git a/daemon/realpath.mli b/daemon/realpath.mli
deleted file mode 100644
index 10b9ae565..000000000
--- a/daemon/realpath.mli
+++ /dev/null
@@ -1,20 +0,0 @@
-(* guestfs-inspection
- * Copyright (C) 2009-2018 Red Hat Inc.
- *
- * This program is fre...