search for: devsparts

Displaying 20 results from an estimated 160 matches for "devsparts".

2017 Jan 19
3
[PATCH 1/2] daemon: Fix part-to-dev when the partition name includes p<N>.
From: Pino Toscano <ptoscano@redhat.com> If the device name ends with a number, Linux uses partition names of the form <device>p<N>. Handle this case by knocking off the 'p' character. --- daemon/devsparts.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/daemon/devsparts.c b/daemon/devsparts.c index 5862ae2..b764f63 100644 --- a/daemon/devsparts.c +++ b/daemon/devsparts.c @@ -203,6 +203,9 @@ do_part_to_dev (const char *part) return NULL; } + if (part[n-1] == 'p') + n--;...
2018 Jan 22
0
[RFC PATCH v1 2/3] daemon: devsparts: add is_partitioned_device function
The function takes one argument - device path (e.g. /dev/sda) and returns true if device contains partition(s) or false otherwise. The function look in /sys/block/<device>/ for entries starting with <device>, eg. /sys/block/sda/sda1. --- daemon/devsparts.ml | 14 ++++++++++++++ daemon/devsparts.mli | 1 + 2 files changed, 15 insertions(+) diff --git a/daemon/devsparts.ml b/daemon/devsparts.ml index 54108bb..60ac11a 100644 --- a/daemon/devsparts.ml +++ b/daemon/devsparts.ml @@ -71,6 +71,20 @@ let list_devices () = map_block_devices ~return_m...
2009 Aug 06
1
[PATCH] Fix errno check in readdir in devsparts.c
--- daemon/devsparts.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/daemon/devsparts.c b/daemon/devsparts.c index b89682c..e9c5e8f 100644 --- a/daemon/devsparts.c +++ b/daemon/devsparts.c @@ -40,7 +40,6 @@ foreach_block_device (block_dev_func_t func) int size = 0, alloc = 0; D...
2018 Jan 25
0
[PATCH v2 2/3] daemon: list-filesystems: Don't list partitions which cannot hold file system.
Filter out: 1. Partitioned md devices (as we do this for physial devices). 2. Extended MBR partitions. 3. LDM partitions (MBR and GPT partitions used by Windows Logical Disk Manager) 4. Microsoft Reseved Partitions. --- daemon/devsparts.ml | 13 +++++++ daemon/devsparts.mli | 1 + daemon/listfs.ml | 105 +++++++++++++++++++++++++++------------------------ 3 files changed, 70 insertions(+), 49 deletions(-) diff --git a/daemon/devsparts.ml b/daemon/devsparts.ml index 54108bb..42dc78d 100644 --- a/daemon/devsparts.ml +++ b/d...
2017 Apr 19
1
[PATCH] daemon: Remove use of fixed-size stack buffers.
GCC 7 complains that the fixed size buffers are not large enough (at least in theory) when using ‘-O3 -mtune=broadwell’. --- daemon/devsparts.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/daemon/devsparts.c b/daemon/devsparts.c index 584e7d8b8..eac79197e 100644 --- a/daemon/devsparts.c +++ b/daemon/devsparts.c @@ -125,13 +125,16 @@ foreach_block_device (block_dev_func_t func, bool return_md) sta...
2018 Jan 23
2
Re: [RFC PATCH v1 3/3] daemon: list-filesystems: Don't list partitioned md devices
...t a/daemon/listfs.ml b/daemon/listfs.ml > index 370ffb4..dc424f5 100644 > --- a/daemon/listfs.ml > +++ b/daemon/listfs.ml > @@ -24,24 +24,20 @@ let rec list_filesystems () = > let has_lvm2 = Lvm.available () in > let has_ldm = Ldm.available () in > > - let devices = Devsparts.list_devices () in > let partitions = Devsparts.list_partitions () in > - let mds = Md.list_md_devices () in > > (* Look to see if any devices directly contain filesystems > - * (RHBZ#590167). However vfs-type will fail to tell us anything > + * (RHBZ#590167). Howeve...
2013 Feb 07
1
[PATCH] New API: is_whole_device
--- daemon/devsparts.c | 27 +++++++++++++++++++++++++++ generator/actions.ml | 17 +++++++++++++++++ src/MAX_PROC_NR | 2 +- 3 files changed, 45 insertions(+), 1 deletion(-) diff --git a/daemon/devsparts.c b/daemon/devsparts.c index 9a2ce9a..1939f2a 100644 --- a/daemon/devsparts.c +++ b/daemon/devsparts.c @@...
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.
2016 Mar 02
1
[PATCH] daemon: do not fail list-disk-labels w/o labels set
If there are no labels set for the disks, the directory with the symlinks will not even exists, causing list-disk-labels to fail with ENOENT. In this situation, act as if the directory was there, but empty. --- daemon/devsparts.c | 7 +++++++ generator/actions.ml | 12 ++++++++++++ 2 files changed, 19 insertions(+) diff --git a/daemon/devsparts.c b/daemon/devsparts.c index 7b92bf6..7c690f8 100644 --- a/daemon/devsparts.c +++ b/daemon/devsparts.c @@ -316,6 +316,13 @@ do_list_disk_labels (void) dir = opendir (GUEST...
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 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 -------------- daemon/utils.ml | 84 +++++++++++++++ daemon/utils.mli | 15 +++ generator...
2009 Jul 29
2
[PATCH] Fix broken qemu <= 0.10 which randomly adds a CD-ROM device to the appliance
...p2v -------------- next part -------------- >From 6bb26f2d253b77570c2b9291021db4364597b6df Mon Sep 17 00:00:00 2001 From: Richard Jones <rjones at centos5x32.home.annexia.org> Date: Wed, 29 Jul 2009 15:02:16 +0100 Subject: [PATCH] Don't show empty CD devices (RHBZ#514505). --- daemon/devsparts.c | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/daemon/devsparts.c b/daemon/devsparts.c index 32d2fa8..a198ccd 100644 --- a/daemon/devsparts.c +++ b/daemon/devsparts.c @@ -37,6 +37,7 @@ do_list_devices (void) DIR *dir; struct dirent *d;...
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
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
2009 Aug 03
1
[PATCH] Recognise cd-rom devices in devsparts.c
Also: * Un-duplicate device detection code by creating a common mapping function. * Add some more comments. --- daemon/devsparts.c | 209 +++++++++++++++++++++++++++++----------------------- 1 files changed, 116 insertions(+), 93 deletions(-) diff --git a/daemon/devsparts.c b/daemon/devsparts.c index 33579ba..0e056a1 100644 --- a/daemon/devsparts.c +++ b/daemon/devsparts.c @@ -29,57 +29,38 @@ #include "daemon.h"...
2018 Apr 27
0
[PATCH v5 2/3] daemon: list-filesystems: Don't list partitions which cannot hold file system.
...-- 1 file changed, 81 insertions(+), 49 deletions(-) diff --git a/daemon/listfs.ml b/daemon/listfs.ml index 56ebadeda..5499bacb2 100644 --- a/daemon/listfs.ml +++ b/daemon/listfs.ml @@ -25,39 +25,18 @@ let rec list_filesystems () = let has_ldm = Optgroups.ldm_available () in let devices = Devsparts.list_devices () in - let partitions = Devsparts.list_partitions () in + let devices = List.filter check_device devices in let mds = Md.list_md_devices () in - - (* Look to see if any devices directly contain filesystems - * (RHBZ#590167). However vfs-type will fail to tell us anything -...
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
2017 Jan 19
0
[PATCH 2/2] daemon: Return MD partitions in guestfs_list_partitions (RHBZ#1414510).
From: Pino Toscano <ptoscano@redhat.com> --- daemon/devsparts.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/daemon/devsparts.c b/daemon/devsparts.c index b764f63..852ee99 100644 --- a/daemon/devsparts.c +++ b/daemon/devsparts.c @@ -20,6 +20,7 @@ #include <stdio.h> #include <stdlib.h> +#include <stdb...
2017 Apr 19
2
[PATCH v2] daemon: Remove use of fixed-size stack buffers.
v1 -> v2: - Fixes as suggested by Pino. Rich.