search for: part_get_mbr_part_typ

Displaying 20 results from an estimated 28 matches for "part_get_mbr_part_typ".

Did you mean: part_get_mbr_part_type
2018 Jan 28
0
[PATCH v3 1/3] daemon: Reimplement 'part_get_mbr_part_type' API in OCaml.
Instead of parsing 'parted' output OCaml implementation relies on the following facts: 1. The function is applicable for MBR partitions only (as noted in documentation and as function name suggests). 2. An attempt to call the function for non-MBR partition fails with "part_get_mbr_part_type can only be used on MBR Partitions" error and NULL is returned. 3. MBR partition table can hold up to 4 "primary" partitions. 4. Partition with number >= 5 is logical partition. 5. Extnded partition number is <= 4 and has MBR id 0x05 or 0x0f (http://thestarman.pcministry.com/a...
2018 Feb 06
2
Re: [PATCH v3 1/3] daemon: Reimplement 'part_get_mbr_part_type' API in OCaml.
...a nod towards gpt: > - for (i = 0, row = start; row < end; ++i, ++row) { > - if (STREQ (parttype, "gpt")) { > - memcpy (temp_type, "primary", strlen ("primary")); whereas the replacement deliberately breaks this case: > + failwithf "part_get_mbr_part_type can only be used on MBR Partitions" This change is too fundamental to go in just before the stable release (1.38). I'm going to release 1.38 real soon and then we can look at this again. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my pr...
2018 Feb 19
0
Re: [PATCH v3 1/3] daemon: Reimplement 'part_get_mbr_part_type' API in OCaml.
...- for (i = 0, row = start; row < end; ++i, ++row) { >> - if (STREQ (parttype, "gpt")) { >> - memcpy (temp_type, "primary", strlen ("primary")); > > whereas the replacement deliberately breaks this case: > >> + failwithf "part_get_mbr_part_type can only be used on MBR Partitions" > > This change is too fundamental to go in just before the stable release > (1.38). I'm going to release 1.38 real soon and then we can look at > this again. > > Rich. > > -- > Richard Jones, Virtualization Group, Red Hat ht...
2018 Jan 25
2
[PATCH v2 1/3] daemon: Reimplement 'part_get_mbr_part_type' API in OCaml.
Instead of parsing 'parted' output OCaml implementation relies on the following facts: 1. The function is applicable for MBR partitions only (as noted in documentation and as function name suggests). 2. An attempt to call the function for non-MBR partition fails with "part_get_mbr_part_type can only be used on MBR Partitions" error and NULL is returned. 3. MBR partition table can hold up to 4 "primary" partitions. 4. Partition with number >= 5 is logical partition 5. Extnded partition number is <= 4 and has MBR id 0x05 or 0x0f (http://thestarman.pcministry.com/as...
2018 Feb 20
1
Re: [PATCH v3 1/3] daemon: Reimplement 'part_get_mbr_part_type' API in OCaml.
On Mon, Feb 19, 2018 at 09:48:39PM +0200, Nikolay Ivanets wrote: > Richard, 1.38 is out. Can we come back and discuss these patch series? Can you repost it, rebased, and taking into account the review comments from last time. Thanks, Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com
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 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...
2015 Mar 30
1
[PATCH RFC] resize: add p_mbr_p_type as member of type partition
Add p_mbr_p_type as member of type partition to describe mbr partition type. Currently we use: List.filter (fun p -> parttype <> MBR || p.G.part_num <= 4_l) to filter out logical partitions. Commit 0c396a4bce578486dfc4a38e1f8c47fd5c2836ea introduce API part_get_mbr_part_type, we could use this to know the part_type. Furthermore, we could also use p_mbr_p_type for resizing logical partitions. Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> --- resize/resize.ml | 47 +++++++++++++++++++++++++++++++---------------- 1 file changed, 31 insertions(+), 16 de...
2018 May 01
9
[PATCH v6 0/7] daemon: list_filesystems: filter out block devices which cannot hold filesystem
...itioned MD devices. daemon: list-filesystems: Change the way we filter out LDM partitions. daemon: list-filesystems: Filter out Microsoft Reserved and Windows Snapshot partitions. daemon: list-ilesystems: Filter out MBR extended partitions. Nikolay Ivanets (1): daemon: Reimplement 'part_get_mbr_part_type' API in OCaml. daemon/listfs.ml | 127 +++++++++++++----------- daemon/parted.c | 106 -------------------- daemon/parted.ml | 13 +++ generator/actions_core.ml | 1 + tests/md/Makefile.am...
2018 May 01
0
[PATCH v6 7/7] daemon: list-ilesystems: Filter out MBR extended partitions.
...artition. *) | "CADDEBF1-4400-4DE8-B103-12117DCF3CCF" -> false - | _ -> true + | _ -> not (is_mbr_extended parttype device partnum) ) else true +and is_mbr_extended parttype device partnum = + if parttype = "msdos" then ( + let mbr_type = Parted.part_get_mbr_part_type device partnum in + mbr_type = "extended" + ) + else false + (* Use vfs-type to check for a filesystem of some sort of [device]. * Returns [Some [device, vfs_type; ...]] if found (there may be * multiple devices found in the case of btrfs), else [None] if nothing -- 2.17.0
2015 Mar 24
0
Re: [PATCH 2/2] New API: part_get_part_type for showing partition type
On Tue, Mar 24, 2015 at 07:20:17AM -0400, Chen Hanxiao wrote: > This patch will add support for getting partition type > of a partiton numbered device. > > Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> I have pushed this. I changed the API name to part_get_mbr_part_type since it's really MBR-specific, and also we have an API called part_get_parttype[1] so there was an opportunity for confusion. Also I added an extra test and made a small adjustment to the API description. Here are the upstream commits: https://github.com/libguestfs/libguestfs/commit/af9aa2...
2015 Mar 24
1
[PATCH 2/2] New API: part_get_part_type for showing partition type
This patch will add support for getting partition type of a partiton numbered device. Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> --- daemon/parted.c | 106 +++++++++++++++++++++++++++++++++++++++++++++++++++ generator/actions.ml | 18 +++++++++ src/MAX_PROC_NR | 2 +- 3 files changed, 125 insertions(+), 1 deletion(-) diff --git a/daemon/parted.c
2018 Jun 01
7
[PATCH v8 0/6] daemon: list_filesystems: filter out block devices which cannot hold filesystem.
v8: - Rebased on top of master. v7: - Addresses comments after v6 series review. v6: - Addresses comments after v5 series review. - Large commit is splitted to more granular commits for better code review. v5: - Addresses comments after v4 series review (part_get_mbr_part_type doesn't break original implementation in C). - Rebased on top of master and little bit refactored for readability. v4: - Rebased on top of master. v3: - Rebased on top of master. v2: - First implementation. v1: - Initial discussion. This patch series filters out block devices which cannot...
2018 Apr 27
0
[PATCH v5 2/3] daemon: list-filesystems: Don't list partitions which cannot hold file system.
...um partition in + let parttype = Parted.part_get_parttype device in + + let is_gpt = parttype = "gpt" in + let is_mbr = parttype = "msdos" in + let is_gpt_or_mbr = is_gpt || is_mbr in + + let is_mbr_extended = + if is_mbr then ( + let mbr_type = Parted.part_get_mbr_part_type device partnum in + mbr_type = "extended" + ) + else false in + + let is_gpt_ignored = + if is_gpt_or_mbr then ( + (* MBR partition id will be converted into corresponding GPT type. *) + let gpt_type = Parted.part_get_gpt_type device partnum in +...
2018 Jan 25
0
[PATCH v2 2/3] daemon: list-filesystems: Don't list partitions which cannot hold file system.
...ype = Parted.part_get_gpt_type device partnum in + + let is_ldm = gpt_type = gpt_ldm_metadata || gpt_type = gpt_ldm_data in + let is_ldm = Ldm.available () && (is_gpt || is_mbr) && is_ldm in + let is_msr = is_gpt && gpt_type = gpt_msr in + + let mbr_type = Parted.part_get_mbr_part_type device partnum in + let is_extended = mbr_type = "extended" in + + not (is_ldm || is_msr || is_extended) + with exn -> + if verbose () then + eprintf "check_partition: %s: %s\n" + partition (Printexc.to_string exn); + true + (* Use v...
2015 Mar 24
4
[PATCH 0/2] New API: part_get_part_type
Chen Hanxiao (2): parted: introduce enum for whether parted has option -m New API: part_get_part_type for showing partition type daemon/parted.c | 136 ++++++++++++++++++++++++++++++++++++++++++++++----- generator/actions.ml | 18 +++++++ src/MAX_PROC_NR | 2 +- 3 files changed, 143 insertions(+), 13 deletions(-) -- 2.1.0
2019 Jan 17
0
ANNOUNCE: libguestfs 1.40 released
...pand an f2fs filesystem (Pino Toscano). "inspect_get_osinfo" Get the libosinfo short ID for the inspected guest (Pino Toscano). "lvm_scan" This rescans all PVs, VGs and LVs, optionally activating them. Other API changes "part_get_mbr_part_type" was reimplemented in OCaml (Nikolay Ivanets). "list_filesystems" now filters out MBR extended partitions (Nikolay Ivanets). "vgscan" has been deprecated. Use the new "lvm_scan" API in preference. Build changes The JSON l...
2018 May 02
6
[PATCH v7 0/6] daemon: list_filesystems: filter out block devices which cannot hold filesystem.
This patch series addresses comments after v6 series 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 the way we filter out LDM partitions. daemon: list-filesystems: Filter out
2020 Sep 07
9
[PATCH v2 0/7] Windows BitLocker support.
Original version linked from here: https://bugzilla.redhat.com/show_bug.cgi?id=1808977#c8 There is no change in the code in this series, but feedback from the original series was we shouldn't lose the error message in patch 7. When I tested this just now in fact we don't lose the error if debugging is enabled, but I have updated the commit message to note what the error message is in the
2020 Mar 30
9
[PATCH 0/7] Support Windows BitLocker (RHBZ#1808977).
These commits, along with the associated changes to common: https://www.redhat.com/archives/libguestfs/2020-March/msg00286.html support the transparent decryption and inspection of Windows guests encrypted with BitLocker encryption. To do the BitLocker decryption requires cryptsetup 2.3.0 (although cryptsetup 2.3 is not required for existing LUKS use). It also requires a new-ish Linux kernel, I