search for: parttyp

Displaying 20 results from an estimated 115 matches for "parttyp".

Did you mean: parttype
2012 Feb 06
2
[PATCH 1/2] Revert "daemon: Run udev_settle after pwrite-device finishes."
From: "Richard W.M. Jones" <rjones at redhat.com> This reverts commit a9c8123c72db47bcab8dd738e8d5256a9ae87f11. --- daemon/file.c | 18 +++--------------- daemon/parted.c | 3 +-- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/daemon/file.c b/daemon/file.c index 057e15d..91746e0 100644 --- a/daemon/file.c +++ b/daemon/file.c @@ -525,7 +525,7 @@
2015 May 28
2
Re: [PATCH v2 02/11] resize: add logical_partitions and extended_partition
...on initialized to the first partition, if there are no extended partitions? I think you probably meant to write: let extended_partition = match extended_partition_list with | h :: _ -> Some h | [] -> None in > + let logical_partitions = > + List.filter (fun p -> parttype = MBR && p.p_mbr_p_type = LogicalPartition) partitions in > + (* Filter out logical partitions. See note above. *) > + let partitions = > + (* for GPT, all partitions are regarded as Primary Partition, > + * e.g. there is no Extended Partition or Logical Partition. *)...
2015 Mar 17
4
[PATCH] New API: part_get_part_type for showing partition type
...+#ifndef PARTED_NO_M +# define PARTED_NO_M 0 +#endif + /* Notes: * * Parted 1.9 sends error messages to stdout, hence use of the @@ -1022,3 +1026,111 @@ do_part_get_name (const char *device, int partnum) reply_with_error ("cannot get the partition name from '%s' layouts", parttype); return NULL; } + +char * +do_part_get_part_type (const char *device, int partnum) +{ + CLEANUP_FREE char *parttype; + char *part_type; + + if (partnum <= 0) { + reply_with_error ("partition number must be >= 1"); + return NULL; + } + + parttype = do_part_get_partty...
2015 May 28
1
Re: [PATCH v2 02/11] resize: add logical_partitions and extended_partition
On Thu, May 28, 2015 at 01:13:28PM +0200, Pino Toscano wrote: > In data giovedì 28 maggio 2015 12:06:18, Richard W.M. Jones ha scritto: > > > + let logical_partitions = > > > + List.filter (fun p -> parttype = MBR && p.p_mbr_p_type = LogicalPartition) partitions in > > > + (* Filter out logical partitions. See note above. *) > > > + let partitions = > > > + (* for GPT, all partitions are regarded as Primary Partition, > > > + * e.g. there is no Ext...
2018 Jan 28
0
[PATCH v3 1/3] daemon: Reimplement 'part_get_mbr_part_type' API in OCaml.
...nly 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/asm/mbr/PartTypes.htm; https://en.wikipedia.org/wiki/Partition_type). --- daemon/parted.c | 106 ---------------------------------------------- daemon/parted.ml | 14 ++++++ daemon/parted.mli | 2 + generator/actions_core.ml | 1 + 4 files changed, 17 insertions(+), 106 deletions(-...
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 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.
2015 May 20
0
[PATCH v2 02/11] resize: add logical_partitions and extended_partition
...Minimum surplus before we create an extra partition. *) let min_extra_partition = 10L *^ 1024L *^ 1024L +(* mbr extended partition *) +let extended_partition_list = [] + (* Command line argument parsing. *) type align_first_t = [ `Never | `Always | `Auto ] (* Source partition type. *) type parttype = MBR | GPT -(* Data structure describing the source disk's partition layout. - * - * NOTE: For MBR, only primary/extended partitions are tracked here. - * Logical partitions are contained within an extended partition, and - * we don't track them (they are just copied within the extended...
2018 Jan 25
2
[PATCH v2 1/3] daemon: Reimplement 'part_get_mbr_part_type' API in OCaml.
...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/asm/mbr/PartTypes.htm; https://en.wikipedia.org/wiki/Partition_type). --- daemon/parted.c | 106 ---------------------------------------------- daemon/parted.ml | 14 ++++++ daemon/parted.mli | 2 + generator/actions_core.ml | 1 + 4 files changed, 17 insertions(+), 106 deletions(-...
2019 Jan 21
0
[PATCH nbdkit v2 1/4] partitioning plugin: Support MBR logical partitions.
...(i = 0; i < nr_files; ++i) total_size += files[i].statbuf.st_size; - - if (nr_files > 4) - needs_gpt = true; - else if (total_size > MAX_MBR_DISK_SIZE) - needs_gpt = true; - else - needs_gpt = false; + needs_gpt = total_size > MAX_MBR_DISK_SIZE; /* Choose default parttype if not set. */ if (parttype == PARTTYPE_UNSET) { - if (needs_gpt) { + if (needs_gpt || nr_files > 4) { parttype = PARTTYPE_GPT; nbdkit_debug ("picking partition type GPT"); } @@ -257,8 +259,8 @@ partitioning_config_complete (void) } } else if (pa...
2015 Mar 23
0
Re: [PATCH] New API: part_get_part_type for showing partition type
...endif What does this bit do? > /* Notes: > * > * Parted 1.9 sends error messages to stdout, hence use of the > @@ -1022,3 +1026,111 @@ do_part_get_name (const char *device, int partnum) > reply_with_error ("cannot get the partition name from '%s' layouts", parttype); > return NULL; > } > + > +char * > +do_part_get_part_type (const char *device, int partnum) > +{ > + CLEANUP_FREE char *parttype; > + char *part_type; > + > + if (partnum <= 0) { > + reply_with_error ("partition number must be >= 1"); &g...
2015 Mar 24
1
[PATCH 2/2] New API: part_get_part_type for showing partition type
...deletion(-) diff --git a/daemon/parted.c b/daemon/parted.c index 64a7d3c..3aac102 100644 --- a/daemon/parted.c +++ b/daemon/parted.c @@ -1028,3 +1028,109 @@ do_part_get_name (const char *device, int partnum) reply_with_error ("cannot get the partition name from '%s' layouts", parttype); return NULL; } + +char * +do_part_get_part_type (const char *device, int partnum) +{ + CLEANUP_FREE char *parttype; + char *part_type; + + parttype = do_part_get_parttype (device); + if (parttype == NULL) + return NULL; + + /* machine parseable output by 'parted -m' did not p...
2019 Jan 20
1
[PATCH nbdkit] partitioning: Support MBR logical partitions.
An evolution of the patch I posted yesterday to qemu-devel (https://www.mail-archive.com/qemu-devel@nongnu.org/msg588920.html) which (a) works and (b) has a test. Rich.
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 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
2015 Mar 24
2
Re: [PATCH] New API: part_get_part_type for showing partition type
...> > > /* Notes: > > * > > * Parted 1.9 sends error messages to stdout, hence use of the > > @@ -1022,3 +1026,111 @@ do_part_get_name (const char *device, int partnum) > > reply_with_error ("cannot get the partition name from '%s' layouts", parttype); > > return NULL; > > } > > + > > +char * > > +do_part_get_part_type (const char *device, int partnum) > > +{ > > + CLEANUP_FREE char *parttype; > > + char *part_type; > > + > > + if (partnum <= 0) { > > + reply_with_e...
2015 May 28
0
Re: [PATCH v2 02/11] resize: add logical_partitions and extended_partition
In data giovedì 28 maggio 2015 12:06:18, Richard W.M. Jones ha scritto: > > + let logical_partitions = > > + List.filter (fun p -> parttype = MBR && p.p_mbr_p_type = LogicalPartition) partitions in > > + (* Filter out logical partitions. See note above. *) > > + let partitions = > > + (* for GPT, all partitions are regarded as Primary Partition, > > + * e.g. there is no Extended Partition or L...
2018 Jan 10
0
[PATCH 3/3] resize: copy GPT partition flags
...going to do: *) mutable p_operation : partition_operation; @@ -493,6 +494,12 @@ read the man page virt-resize(1). let label = try Some (g#part_get_name "/dev/sda" part_num) with G.Error _ -> None in + let attributes = + match parttype with + | MBR -> None + | GPT -> + try Some (g#part_get_gpt_attributes "/dev/sda" part_num) + with G.Error _ -> None in let guid = match parttype with | MBR -> None @@ -502,7 +509,7 @@ read th...
2018 Jan 15
0
[PATCH v2 3/3] resize: copy GPT partition flags
...going to do: *) mutable p_operation : partition_operation; @@ -493,6 +494,12 @@ read the man page virt-resize(1). let label = try Some (g#part_get_name "/dev/sda" part_num) with G.Error _ -> None in + let attributes = + match parttype with + | MBR -> None + | GPT -> + try Some (g#part_get_gpt_attributes "/dev/sda" part_num) + with G.Error _ -> None in let guid = match parttype with | MBR -> None @@ -502,7 +509,7 @@ read th...
2018 May 01
0
[PATCH v6 7/7] daemon: list-ilesystems: Filter out MBR extended partitions.
...in @@ -106,10 +106,17 @@ and is_partition_can_hold_filesystem partition = | "E3C9E316-0B5C-4DB8-817D-F92DF00215AE" (* Windows Snapshot Partition. *) | "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 s...