search for: part_to_partnum

Displaying 20 results from an estimated 52 matches for "part_to_partnum".

2017 Jul 14
0
[PATCH 05/27] daemon: Reimplement several devsparts APIs in OCaml.
The reimplemented APIs are: * list_devices * list_partitions * part_to_dev * part_to_partnum * is_whole_device --- daemon/Makefile.am | 2 + daemon/daemon.h | 3 - daemon/devsparts.c | 257 ---------------------------------------------- daemon/devsparts.ml | 109 ++++++++++++++++++++ daemon/devsparts.mli | 25 +++++ daemon/guestfsd.c | 75 -...
2020 Jun 30
2
[PATCH] daemon: inspect_fs_windows: Handle parted errors
...8 = diskid + with Unix.Unix_error (Unix.EINVAL, _, _) -> false ) devices in (* Next 8 bytes are the offset of the partition in bytes(!) given as @@ -402,7 +404,10 @@ and map_registry_disk_blob_gpt partitions blob = fun part -> let partnum = Devsparts.part_to_partnum part in let device = Devsparts.part_to_dev part in - let typ = Parted.part_get_parttype device in + let typ = + try + Parted.part_get_parttype device + with Unix.Unix_error (Unix.EINVAL, _, _) -> "unknown" in if...
2018 Jan 25
0
[PATCH v2 2/3] daemon: list-filesystems: Don't list partitions which cannot hold file system.
...s in let partitions = List.flatten partitions in diff --git a/daemon/devsparts.mli b/daemon/devsparts.mli index 7b669c2..d3224a1 100644 --- a/daemon/devsparts.mli +++ b/daemon/devsparts.mli @@ -21,5 +21,6 @@ val list_partitions : unit -> string list val part_to_dev : string -> string val part_to_partnum : string -> int val is_whole_device : string -> bool +val is_partitioned_device : string -> bool val nr_devices : unit -> int val device_index : string -> int diff --git a/daemon/listfs.ml b/daemon/listfs.ml index 370ffb4..1349ae0 100644 --- a/daemon/listfs.ml +++ b/daemon/listfs....
2020 Feb 20
0
buffer overflow detected in collectd using libguestfs
...89]: libguestfs: trace: part_to_dev = "/dev/sda" Feb 20 15:58:11 tve50 collectd[4689]: libguestfs: trace: part_to_dev "/dev/sda15" Feb 20 15:58:11 tve50 collectd[4689]: libguestfs: trace: part_to_dev = "/dev/sda" Feb 20 15:58:11 tve50 collectd[4689]: libguestfs: trace: part_to_partnum "/dev/sda1" Feb 20 15:58:11 tve50 collectd[4689]: libguestfs: trace: part_to_partnum = 1 Feb 20 15:58:11 tve50 collectd[4689]: libguestfs: trace: part_to_dev "/dev/sda1" Feb 20 15:58:11 tve50 collectd[4689]: libguestfs: trace: part_to_dev = "/dev/sda" Feb 20 15:58:11 t...
2020 Jun 30
1
Re: [PATCH] daemon: inspect_fs_windows: Handle parted errors
...EINVAL error. Or, even better, > try to avoid altogether the situation that 7b4d13626ff878 checks, > handling this issue as well. > > > @@ -402,7 +404,10 @@ and map_registry_disk_blob_gpt partitions blob = > > fun part -> > > let partnum = Devsparts.part_to_partnum part in > > let device = Devsparts.part_to_dev part in > > - let typ = Parted.part_get_parttype device in > > + let typ = > > + try > > + Parted.part_get_parttype device > > + with Unix.Unix_error (U...
2018 Apr 27
0
[PATCH v5 2/3] daemon: list-filesystems: Don't list partitions which cannot hold file system.
...tems + * on these later. We also ignores Microsoft Reserved Partitions, + * Windows Snapshot Partition and extended MBR partitions because they + * cannot hold filesystem. + *) +and check_partition partition = + try + let device = Devsparts.part_to_dev partition in + let partnum = Devsparts.part_to_partnum 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.pa...
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.
2017 Mar 13
2
virt-customize fail to inject firstboot script when running it from script.
...: mount_ro "/dev/sda1" "/" libguestfs: trace: mount_ro = 0 libguestfs: trace: part_to_dev "/dev/sda1" libguestfs: trace: part_to_dev = "/dev/sda" libguestfs: trace: device_index "/dev/sda" libguestfs: trace: device_index = 0 libguestfs: trace: part_to_partnum "/dev/sda1" libguestfs: trace: part_to_partnum = 1 libguestfs: trace: part_to_dev "/dev/sda1" libguestfs: trace: part_to_dev = "/dev/sda" libguestfs: trace: part_list "/dev/sda" libguestfs: trace: part_list = <struct guestfs_partition_list(2) = [0]{pa...
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
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
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
2018 Sep 19
2
virt-customize is very slow in ubuntu 18.04/centos 7.5
.../dev/sda15" guestfsd: main_loop: proc 272 (part_to_dev) took 0.01 seconds guestfsd: main_loop: new request, len 0x38 commandrvf: stdout=n stderr=y flags=0x0 commandrvf: udevadm --debug settle -E /dev/sda15 calling: settle libguestfs: trace: part_to_dev = "/dev/sda" libguestfs: trace: part_to_partnum "/dev/sda1" guestfsd: main_loop: proc 272 (part_to_dev) took 0.01 seconds guestfsd: main_loop: new request, len 0x38 commandrvf: stdout=n stderr=y flags=0x0 commandrvf: udevadm --debug settle -E /dev/sda1 calling: settle libguestfs: trace: part_to_partnum = 1 libguestfs: trace: part_to_de...
2017 Mar 14
0
Re: virt-customize fail to inject firstboot script when running it from script.
...t; "/" > libguestfs: trace: mount_ro = 0 > libguestfs: trace: part_to_dev "/dev/sda1" > libguestfs: trace: part_to_dev = "/dev/sda" > libguestfs: trace: device_index "/dev/sda" > libguestfs: trace: device_index = 0 > libguestfs: trace: part_to_partnum "/dev/sda1" > libguestfs: trace: part_to_partnum = 1 > libguestfs: trace: part_to_dev "/dev/sda1" > libguestfs: trace: part_to_dev = "/dev/sda" > libguestfs: trace: part_list "/dev/sda" > libguestfs: trace: part_list = <struct guestfs_p...
2016 Jun 13
1
[PATCH] v2v: Fix get_firmware_bootable_device.
I'm going to push this because it's a test blocker, but FYI. Rich.
2018 Jan 22
0
[RFC PATCH v1 2/3] daemon: devsparts: add is_partitioned_device function
...s in let partitions = List.flatten partitions in diff --git a/daemon/devsparts.mli b/daemon/devsparts.mli index 7b669c2..d3224a1 100644 --- a/daemon/devsparts.mli +++ b/daemon/devsparts.mli @@ -21,5 +21,6 @@ val list_partitions : unit -> string list val part_to_dev : string -> string val part_to_partnum : string -> int val is_whole_device : string -> bool +val is_partitioned_device : string -> bool val nr_devices : unit -> int val device_index : string -> int -- 2.9.5
2020 Jun 30
0
Re: [PATCH] daemon: inspect_fs_windows: Handle parted errors
...ther than catching a generic EINVAL error. Or, even better, try to avoid altogether the situation that 7b4d13626ff878 checks, handling this issue as well. > @@ -402,7 +404,10 @@ and map_registry_disk_blob_gpt partitions blob = > fun part -> > let partnum = Devsparts.part_to_partnum part in > let device = Devsparts.part_to_dev part in > - let typ = Parted.part_get_parttype device in > + let typ = > + try > + Parted.part_get_parttype device > + with Unix.Unix_error (Unix.EINVAL, _, _) -> "...
2017 Mar 14
2
Re: virt-customize fail to inject firstboot script when running it from script.
...gt;> libguestfs: trace: mount_ro = 0 >> libguestfs: trace: part_to_dev "/dev/sda1" >> libguestfs: trace: part_to_dev = "/dev/sda" >> libguestfs: trace: device_index "/dev/sda" >> libguestfs: trace: device_index = 0 >> libguestfs: trace: part_to_partnum "/dev/sda1" >> libguestfs: trace: part_to_partnum = 1 >> libguestfs: trace: part_to_dev "/dev/sda1" >> libguestfs: trace: part_to_dev = "/dev/sda" >> libguestfs: trace: part_list "/dev/sda" >> libguestfs: trace: part_list = <s...
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 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
2015 May 28
3
Re: Concurrent scanning of same disk
..._device) tolibguestfs: trace: is_whole_device = 0 libguestfs: trace: mount_ro "/dev/sda1" "/" ok 0.00 seconds guestfsd: main_loop: new request, len 0x40 mount -o ro /dev/sda1 /sysroot/ [ 2.938232] fuse init (API version 7.23) libguestfs: trace: mount_ro = 0 libguestfs: trace: part_to_partnum "/dev/sda1" guestfsd: main_loop: proc 73 (mount_ro) took 0.19 seconds guestfsd: main_loop: new request, len 0x38 libguestfs: trace: part_to_partnum = 1 libguestfs: trace: is_dir "/etc" guestfsd: main_loop: proc 293 (part_to_partnum) took 0.00 seconds guestfsd: main_loop: new req...