Displaying 20 results from an estimated 30 matches for "device_index".
2020 Feb 20
1
[PATCH] lib: Move guestfs_device_index impl from daemon to library.
Although the commit message ties this to
https://bugzilla.redhat.com/1804207, in fact I believe this commit
could be applied independently. It's a simple optimization.
Rich.
2017 Mar 13
2
virt-customize fail to inject firstboot script when running it from script.
...ole_device "/dev/sda1"
libguestfs: trace: is_whole_device = 0
libguestfs: trace: 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 &quo...
2017 Mar 14
0
Re: virt-customize fail to inject firstboot script when running it from script.
...t;
> libguestfs: trace: is_whole_device = 0
> libguestfs: trace: 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"
> lib...
2018 Jan 22
0
[RFC PATCH v1 2/3] daemon: devsparts: add is_partitioned_device function
....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
2017 Mar 14
2
Re: virt-customize fail to inject firstboot script when running it from script.
...stfs: trace: is_whole_device = 0
>> libguestfs: trace: 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&...
2018 Jan 25
0
[PATCH v2 2/3] daemon: list-filesystems: Don't list partitions which cannot hold file system.
....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.ml
@@ -25,39 +25,18 @@ let rec list_filesystems () =
let has_ldm = Ldm.available () in
let devices = Devsparts.list_devices () in
- let partitions =...
2017 Apr 20
1
[PATCH] tests: Replace test-max-disks with several tests.
...: incorrect device name at index %zu: "
+ "%s (expected suffix %s)\n",
+ getprogname (), i, devices[i], expected);
+ exit (EXIT_FAILURE);
+ }
+ }
+
+ /* Check drive index. */
+ for (i = 0; i < ndisks; ++i) {
+ int idx;
+
+ idx = guestfs_device_index (g, devices[i]);
+ if (idx == -1)
+ exit (EXIT_FAILURE);
+ if ((int) i != idx) {
+ fprintf (stderr,
+ "%s: incorrect device index for %s: "
+ "expected %zu by got %d\n",
+ getprogname (), devices[i], i, idx);
+ exit...
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 Sep 19
2
virt-customize is very slow in ubuntu 18.04/centos 7.5
..."/dev/sda1"
guestfsd: main_loop: proc 73 (mount_ro) took 0.04 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_dev = "/dev/sda"
libguestfs: trace: device_index "/dev/sda"
guestfsd: main_loop: proc 272 (part_to_dev) took 0.01 seconds
guestfsd: main_loop: new request, len 0x34
commandrvf: stdout=n stderr=y flags=0x0
commandrvf: udevadm --debug settle -E /dev/sda
calling: settle
commandrvf: stdout=n stderr=y flags=0x0
commandrvf: udevadm --debug se...
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 Jan 22
8
[RFC] Inconsistent output of guestfs_list_filesystems
Before I rush to change something I request your comments on the subject.
Let me know what do you think and if it does make sense.
The issue: guesfs_list_filesystems is inconsistent in its output.
For, example, it filters out partitioned physical devices but doesn't do the same for MD devices.
More over, according to its name and API documentation guestfs_list_filesystem should return
2017 Aug 09
0
[PATCH v12 08/11] daemon: Implement inspection types and utility functions.
...t; false
+ | Some path -> Is.is_dir path
+
+(* Rather hairy test for "is a partition", taken directly from
+ * the old C inspection code. XXX fix function and callers
+ *)
+let is_partition partition =
+ try
+ let device = Devsparts.part_to_dev partition in
+ ignore (Devsparts.device_index device);
+ true
+ with _ -> false
+
+let re_major_minor = PCRE.compile "(\\d+)\\.(\\d+)"
+let re_major_no_minor = PCRE.compile "(\\d+)"
+
+let parse_version_from_major_minor str data =
+ if verbose () then
+ eprintf "parse_version_from_major_minor: parsing '%...
2018 Apr 09
0
[PATCH 3/3] daemon: autogenerate most of OCaml interfaces
...reet, Fifth Floor, Boston, MA 02110-1301 USA.
- *)
-
-val list_devices : unit -> string list
-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 nr_devices : unit -> int
-val device_index : string -> int
diff --git a/daemon/file.mli b/daemon/file.mli
deleted file mode 100644
index 1e1631840..000000000
--- a/daemon/file.mli
+++ /dev/null
@@ -1,19 +0,0 @@
-(* guestfs-inspection
- * Copyright (C) 2009-2018 Red Hat Inc.
- *
- * This program is free software; you can redistribute it a...
2018 Apr 10
0
[PATCH v2 5/5] daemon: autogenerate OCaml interfaces
...reet, Fifth Floor, Boston, MA 02110-1301 USA.
- *)
-
-val list_devices : unit -> string list
-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 nr_devices : unit -> int
-val device_index : string -> int
diff --git a/daemon/file.mli b/daemon/file.mli
deleted file mode 100644
index 1e1631840..000000000
--- a/daemon/file.mli
+++ /dev/null
@@ -1,19 +0,0 @@
-(* guestfs-inspection
- * Copyright (C) 2009-2018 Red Hat Inc.
- *
- * This program is free software; you can redistribute it a...
2018 Apr 09
5
[PATCH 0/3] daemon: generate almost all the API OCaml interfaces
Hi,
as a followup for the signature fix for mount_vfs [1], here it is a
patch series to generate automatically most of the OCaml interfaces of
daemon actions. Only the Lvm and Mount modules are left with
hand-written interfaces.
[1] https://www.redhat.com/archives/libguestfs/2018-April/msg00059.html
Thanks,
Pino Toscano (3):
daemon: directly use Optgroups
daemon: use the structs from the
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 Jul 27
23
[PATCH v3 00/23] Reimplement many daemon APIs in OCaml.
I think this fixes everything mentioned:
- Added the Optgroups module as suggested.
- Remove command temporary files.
- Replace command ~flags with ?fold_stdout_on_stderr.
- Nest _with_mounted function.
- Rebase & retest.
Rich.
2017 Jul 21
27
[PATCH v2 00/23] Reimplement many daemon APIs in OCaml.
v1 was posted here:
https://www.redhat.com/archives/libguestfs/2017-July/msg00098.html
This series now depends on two small patches which I posted separately:
https://www.redhat.com/archives/libguestfs/2017-July/msg00207.html
https://www.redhat.com/archives/libguestfs/2017-July/msg00209.html
v1 -> v2:
- Previously changes to generator/daemon.ml were made incrementally
through the patch
2017 Jul 14
45
[PATCH 00/27] Reimplement many daemon APIs in OCaml.
Previously posted as part of the mega utilities/inspection
series here:
https://www.redhat.com/archives/libguestfs/2017-June/msg00232.html
What I've done is to extract just the parts related to rewriting
daemon APIs in OCaml, rebase them on top of the current master, fix a
few things, and recompile and test everything.
Rich.
2018 Apr 10
9
[PATCH v2 0/5] daemon: generate almall the API OCaml interfaces
Hi,
as a followup for the signature fix for mount_vfs [1], here it is a
patch series to generate automatically all the OCaml interfaces of
daemon actions.
[1] https://www.redhat.com/archives/libguestfs/2018-April/msg00059.html
Thanks,
Pino Toscano (5):
daemon: directly use Optgroups
daemon: use the structs from the Structs module
daemon: move Lvm.lv_canonical to new Lvm_utils module