search for: parted_opt_has_m

Displaying 8 results from an estimated 8 matches for "parted_opt_has_m".

2015 Mar 24
1
[PATCH 1/2] parted: introduce enum for whether parted has option -m
...7bcb99..64a7d3c 100644 --- a/daemon/parted.c +++ b/daemon/parted.c @@ -33,6 +33,12 @@ GUESTFSD_EXT_CMD(str_parted, parted); GUESTFSD_EXT_CMD(str_sfdisk, sfdisk); GUESTFSD_EXT_CMD(str_sgdisk, sgdisk); +enum { + PARTED_INVALID = -1, + /* parted do not support -m option */ + PARTED_OPT_NO_M, + PARTED_OPT_HAS_M}; + /* Notes: * * Parted 1.9 sends error messages to stdout, hence use of the @@ -320,7 +326,7 @@ get_table_field (const char *line, int n) static int test_parted_m_opt (void) { - static int result = -1; + static int result = PARTED_INVALID; if (result >= 0) return result; @@...
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 Jun 17
2
[PATCH] daemon: parted: Always use -s option even with -m.
...ug.cgi?id=1232241#c3 --- daemon/parted.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/parted.c b/daemon/parted.c index a36e4e7..59760b4 100644 --- a/daemon/parted.c +++ b/daemon/parted.c @@ -356,7 +356,7 @@ print_partition_table (const char *device, int r; if (PARTED_OPT_HAS_M == parted_has_m_opt) - r = command (&out, &err, str_parted, "-m", "--", device, + r = command (&out, &err, str_parted, "-m", "-s", "--", device, "unit", "b", "print&q...
2015 Oct 05
2
[PATCH] Remove multiple hacks that only apply to RHEL 5.
...<inttypes.h> #include <string.h> @@ -33,13 +34,6 @@ GUESTFSD_EXT_CMD(str_parted, parted); GUESTFSD_EXT_CMD(str_sfdisk, sfdisk); GUESTFSD_EXT_CMD(str_sgdisk, sgdisk); -enum parted_has_m_opt { - PARTED_INVALID = -1, - /* parted do not support -m option */ - PARTED_OPT_NO_M = 0, - PARTED_OPT_HAS_M = 1, -}; - /* Notes: * * Parted 1.9 sends error messages to stdout, hence use of the @@ -319,43 +313,14 @@ get_table_field (const char *line, int n) return q; } -/* RHEL 5 parted doesn't have the -m (machine readable) option so we - * must do a lot more work to parse the output in -...
2015 Mar 24
1
Re: [PATCH 1/2] parted: introduce enum for whether parted has option -m
...12 @@ GUESTFSD_EXT_CMD(str_parted, parted); > > GUESTFSD_EXT_CMD(str_sfdisk, sfdisk); > > GUESTFSD_EXT_CMD(str_sgdisk, sgdisk); > > > > +enum { > > + PARTED_INVALID = -1, > > + /* parted do not support -m option */ > > + PARTED_OPT_NO_M, > > + PARTED_OPT_HAS_M}; > > (I didn't have even the time to reply to the question about this enum) > > PARTED_INVALID does not make much sense, especially that I was > referring just to the parameter for print_partition_table, so for it > only two values (eg PARTED_OUTPUT_MACHINE and PARTED_OUTPU...
2015 Jun 17
0
Re: [PATCH] daemon: parted: Always use -s option even with -m.
...gt; 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/daemon/parted.c b/daemon/parted.c > index a36e4e7..59760b4 100644 > --- a/daemon/parted.c > +++ b/daemon/parted.c > @@ -356,7 +356,7 @@ print_partition_table (const char *device, > int r; > > if (PARTED_OPT_HAS_M == parted_has_m_opt) > - r = command (&out, &err, str_parted, "-m", "--", device, > + r = command (&out, &err, str_parted, "-m", "-s", "--", device, > "unit", "b", >...
2015 Mar 24
0
Re: [PATCH 1/2] parted: introduce enum for whether parted has option -m
...+++ b/daemon/parted.c > @@ -33,6 +33,12 @@ GUESTFSD_EXT_CMD(str_parted, parted); > GUESTFSD_EXT_CMD(str_sfdisk, sfdisk); > GUESTFSD_EXT_CMD(str_sgdisk, sgdisk); > > +enum { > + PARTED_INVALID = -1, > + /* parted do not support -m option */ > + PARTED_OPT_NO_M, > + PARTED_OPT_HAS_M}; (I didn't have even the time to reply to the question about this enum) PARTED_INVALID does not make much sense, especially that I was referring just to the parameter for print_partition_table, so for it only two values (eg PARTED_OUTPUT_MACHINE and PARTED_OUTPUT_NORMAL) are enough. > +...
2015 Jun 18
3
[PATCH v2 0/3] daemon: parted: Always use -s option even with -m.
version 2: - Turn the "unrecognised disk label" error into errno == EINVAL - Fix virt-alignment-scan - Rework the fix for virt-v2v bug 1232192 (see description of patch 3/3)