Displaying 20 results from an estimated 300 matches similar to: "[PATCH] mllib: Add isspace, triml, trimr and trim functions."
2016 Dec 09
0
Re: [PATCH] generator: Share Common_utils code.
On Thursday, 8 December 2016 10:36:45 CET Richard W.M. Jones wrote:
> For a very long time we have maintained two sets of utility functions,
> in mllib/common_utils.ml and generator/utils.ml. This changes things
> so that the same set of utility functions can be shared with both
> directories.
>
> It's not possible to use common_utils.ml directly in the generator
>
2017 Jun 15
0
[PATCH v6 04/41] mllib: Split ‘Common_utils’ into ‘Std_utils’ + ‘Common_utils’.
The new module ‘Std_utils’ contains only functions which are pure
OCaml and depend only on the OCaml stdlib. Therefore these functions
may be used by the generator.
The new module is moved to ‘common/mlstdutils’.
This also removes the "<stdlib>" hack, and the code which copied the
library around.
Also ‘Guestfs_config’, ‘Libdir’ and ‘StringMap’ modules are moved
since these are
2016 Dec 08
4
[PATCH] generator: Share Common_utils code.
For a very long time we have maintained two sets of utility functions,
in mllib/common_utils.ml and generator/utils.ml. This changes things
so that the same set of utility functions can be shared with both
directories.
It's not possible to use common_utils.ml directly in the generator
because it provides several functions that use modules outside the
OCaml stdlib. Therefore we add some
2020 Jan 29
2
Re: [PATCH v2] mlcustomize: Trim whitespaces from commands read from file (RHBZ#1351000)
On Wed, Jan 29, 2020 at 03:07:12PM +0100, Martin Kletzander wrote:
> From: Martin Kletzander <mkletzan@redhat.com>
>
> The first split does not care about the whole string, it is just trying to get
> the command name in front, so triml is just right.
>
> Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
> ---
> mlcustomize/customize_cmdline.ml | 1 +
>
2017 Jul 21
3
[PATCH] common/mlstdutils: Add chomp function to remove \n from end of strings.
This is like the Perl chomp function, it removes a single \n from the
end of a string if present, else leaves the string alone.
I believe I found the only (two) places where such a function is used,
but there may be a few more lurking.
---
common/mlstdutils/std_utils.ml | 7 +++++++
common/mlstdutils/std_utils.mli | 2 ++
common/mlstdutils/std_utils_tests.ml | 10 ++++++++++
2020 Jan 29
0
[PATCH v2] mlcustomize: Trim whitespaces from commands read from file (RHBZ#1351000)
The first split does not care about the whole string, it is just trying to get
the command name in front, so triml is just right.
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
---
mlcustomize/customize_cmdline.ml | 1 +
1 file changed, 1 insertion(+)
diff --git a/mlcustomize/customize_cmdline.ml b/mlcustomize/customize_cmdline.ml
index c062379879e2..abd21a4cbca5 100644
---
2020 Feb 24
0
Re: [PATCH v2] mlcustomize: Trim whitespaces from commands read from file (RHBZ#1351000)
On Wednesday, 29 January 2020 17:22:51 CET Richard W.M. Jones wrote:
> On Wed, Jan 29, 2020 at 03:07:12PM +0100, Martin Kletzander wrote:
> > From: Martin Kletzander <mkletzan@redhat.com>
> >
> > The first split does not care about the whole string, it is just trying to get
> > the command name in front, so triml is just right.
> >
> > Signed-off-by:
2014 Dec 04
2
[PATCH v3 0/2] v2v: When picking a default kernel, favour non-debug
Since v2:
- Use string_suffix kernel_name "-debug" || string_suffix kernel_name "-dbg"
- This requires addition of the string_suffix function and some tests
2020 Jan 23
0
Re: [common PATCH] Trim whitespaces from commands read from file
On Thu, Jan 23, 2020 at 03:16:47PM +0000, Richard W.M. Jones wrote:
>On Thu, Jan 23, 2020 at 02:04:53PM +0100, Martin Kletzander wrote:
>> On Thu, Jan 23, 2020 at 12:16:50PM +0100, Martin Kletzander wrote:
>> >Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
>>
>> I forgot to mention this is trying to fix the following BZ:
>>
>>
2020 Jan 29
0
Re: [common PATCH] Trim whitespaces from commands read from file
On Thu, Jan 23, 2020 at 03:16:47PM +0000, Richard W.M. Jones wrote:
>On Thu, Jan 23, 2020 at 02:04:53PM +0100, Martin Kletzander wrote:
>> On Thu, Jan 23, 2020 at 12:16:50PM +0100, Martin Kletzander wrote:
>> >Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
>>
>> I forgot to mention this is trying to fix the following BZ:
>>
>>
2020 Jan 23
1
Re: [common PATCH] Trim whitespaces from commands read from file
On Thu, Jan 23, 2020 at 10:32:17PM +0100, Martin Kletzander wrote:
>On Thu, Jan 23, 2020 at 03:16:47PM +0000, Richard W.M. Jones wrote:
>>On Thu, Jan 23, 2020 at 02:04:53PM +0100, Martin Kletzander wrote:
>>> On Thu, Jan 23, 2020 at 12:16:50PM +0100, Martin Kletzander wrote:
>>> >Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
>>>
>>> I
2019 Aug 13
0
[PATCH 3/3] generator: improve pod2text invocation
- feed the content directly to stdin, avoid the need of read (and write)
a temporary file
- read all the output at once, without a tail-recurive function
- apply trimming and first line discarding after closing the process
---
generator/utils.ml | 35 ++++++++++++++++-------------------
1 file changed, 16 insertions(+), 19 deletions(-)
diff --git a/generator/utils.ml b/generator/utils.ml
index
2015 Oct 06
0
[PATCH 5/5] mllib: Replace various ad hoc string_* functions with String.*
This is just a straight refactoring. Various ad hoc string_*
functions that appeared in Common_utils have been renamed and placed
in the String.* namespace. The old vs "new" functions are:
string_prefix -> String.is_prefix
string_suffix -> String.is_suffix
string_find -> String.find
replace_str -> String.replace
string_nsplit -> String.nsplit
string_split
2020 Jan 23
6
Re: [common PATCH] Trim whitespaces from commands read from file
On Thu, Jan 23, 2020 at 02:04:53PM +0100, Martin Kletzander wrote:
> On Thu, Jan 23, 2020 at 12:16:50PM +0100, Martin Kletzander wrote:
> >Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
>
> I forgot to mention this is trying to fix the following BZ:
>
> https://bugzilla.redhat.com/show_bug.cgi?id=1351000
> >---
> >mlcustomize/customize_cmdline.ml |
2017 Jul 14
0
[PATCH 03/27] daemon: Reimplement ‘file’ API in OCaml.
‘file’ is a small, self-contained API which runs a single command, so
it's a good test case for reimplementing APIs.
---
daemon/Makefile.am | 2 ++
daemon/file.c | 80 -----------------------------------------------
daemon/file.ml | 60 +++++++++++++++++++++++++++++++++++
daemon/file.mli | 19 +++++++++++
generator/actions_core.ml | 1 +
5 files
2015 Oct 06
10
[PATCH 0/5] mllib: Hide bad String functions and miscellaneous refactoring.
Hide/prevent the use of bad string functions like String.lowercase.
These are replaced by safe functions that won't break UTF-8 strings.
Other miscellaneous refactoring.
Rich.
2020 Jan 21
0
[PATCH 1/1] WIP: sparsify: Support LUKS-encrypted partitions
---
daemon/listfs.ml | 18 +++++++++++++++---
daemon/luks.c | 1 +
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/daemon/listfs.ml b/daemon/listfs.ml
index bf4dca6d4..48880f2e5 100644
--- a/daemon/listfs.ml
+++ b/daemon/listfs.ml
@@ -19,6 +19,7 @@
open Printf
open Std_utils
+open Utils
(* Enumerate block devices (including MD, LVM, LDM and partitions) and use
*
2020 Jan 22
0
Re: [PATCH 1/1] sparsify: support LUKS-encrypted partitions
On Wed, Jan 22, 2020 at 10:16:14AM +0100, Jan Synacek wrote:
> From: Jan Synacek <jan.synacek@redhat.com>
>
> ---
> daemon/listfs.ml | 19 ++++++++++++++++---
> daemon/luks.c | 9 +++++----
> generator/actions_core.ml | 3 ++-
> gobject/Makefile.inc | 2 ++
> inspector/inspector.c | 2 +-
> sparsify/in_place.ml | 2 +-
>
2018 Jan 10
0
[PATCH 1/3] daemon: make sgdisk_info_extract_uuid_field more generic
Rename the sgdisk_info_extract_uuid_field to
sgdisk_info_extract_field in order to reuse it for other field types.
To avoid possible confusion, the list of valid characters used to
extract the value is added to the function parameters.
---
daemon/parted.ml | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/daemon/parted.ml b/daemon/parted.ml
index
2018 Jan 15
0
[PATCH v2 1/3] daemon: make sgdisk_info_extract_uuid_field more generic
Rename the sgdisk_info_extract_uuid_field to
sgdisk_info_extract_field in order to reuse it for other field types.
Just like its C ancestor, it now needs an extractor function to be
passed as parameter.
---
daemon/parted.ml | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/daemon/parted.ml b/daemon/parted.ml
index d6638867a..6fe803613 100644
---