search for: glob_nosort

Displaying 6 results from an estimated 6 matches for "glob_nosort".

2016 Nov 21
0
[PATCH 2/2] kernel: find vmlinuz kernels in modules path (RHBZ#1394699)
...ildcard copy_kernel kernel dtb = let modpath = find_modpath debug kernel_version in kernel_env, kernel_name, kernel_version, modpath with Not_found -> - find_kernel debug host_cpu kernel in + let kernels = + let files = glob "/lib/modules/*/vmlinuz" [GLOB_NOSORT; GLOB_NOESCAPE] in + let files = Array.to_list files in + let kernels = + List.map ( + fun f -> + let modpath = Filename.dirname f in + f, Filename.basename f, Filename.basename modpath, modpath + ) files in + List.sort...
2017 Aug 03
0
[PATCH supermin 9/9] kernel: Reject implausibly small kernels in /lib/modules (RHBZ#1477758).
...+), 5 deletions(-) diff --git a/src/format_ext2_kernel.ml b/src/format_ext2_kernel.ml index 44ba035..d5d529d 100644 --- a/src/format_ext2_kernel.ml +++ b/src/format_ext2_kernel.ml @@ -93,12 +93,16 @@ and find_kernel_from_lib_modules debug = let files = glob "/lib/modules/*/vmlinuz" [GLOB_NOSORT; GLOB_NOESCAPE] in let files = Array.to_list files in let kernels = - List.map ( + filter_map ( fun kernel_file -> - let kernel_name = Filename.basename kernel_file in - let modpath = Filename.dirname kernel_file in - let kernel_version = F...
2017 Aug 03
14
[PATCH supermin 0/9] kernel: Multiple fixes to handling of kernels (RHBZ#1477758).
This patch series fixes several problems in the way that supermin handles kernels. The most pressing problem is that supermin doesn't handle bogus vmlinuz files which aren't actual kernels. Along the way there is a lot of clean up. The patches look much better if you view them with ‘-w’. This series will require plenty of time to be tested in Fedora, especially on non-x86 arches.
2016 Nov 21
2
[PATCH 1/2] kernel: refactor build_kernel & find_kernel
Move the handling of the SUPERMIN_* envvars, and the kernel copy/symlink out of find_kernel to build_kernel: this way find_kernel does only the search. Also, the modules path search is done in by find_kernel as well. This is mostly code motion, with no behaviour changes. --- src/kernel.ml | 89 +++++++++++++++++++++++++++++------------------------------ 1 file changed, 44 insertions(+), 45
2014 Feb 25
2
[PATCH supermin v4] Supermin 5 rewrite.
...#include <glob.h> +#include <assert.h> + +#include <caml/alloc.h> +#include <caml/fail.h> +#include <caml/memory.h> +#include <caml/mlvalues.h> + +/* NB: These flags must appear in the same order as glob.ml */ +static int flags[] = { + GLOB_ERR, + GLOB_MARK, + GLOB_NOSORT, + GLOB_NOCHECK, + GLOB_NOESCAPE, + GLOB_PERIOD, +}; + +value +supermin_glob (value patternv, value flagsv) +{ + CAMLparam2 (patternv, flagsv); + CAMLlocal2 (rv, sv); + int f = 0, r; + size_t i; + glob_t g; + + memset (&g, 0, sizeof g); + + /* Convert flags to bitmask. */ + while (fl...
2010 Aug 12
0
[PATCH, v2]: xl: Implement per-API-call garbage-collection lifetime
...= userdata_path(ctx, domid, "*", "?"); - if (!pattern) return; + pattern = userdata_path(&gc, domid, "*", "?"); + if (!pattern) + goto out; gl.gl_pathc = 0; gl.gl_pathv = 0; gl.gl_offs = 0; r = glob(pattern, GLOB_ERR|GLOB_NOSORT|GLOB_MARK, 0, &gl); - if (r == GLOB_NOMATCH) return; - if (r) XL_LOG_ERRNO(ctx, XL_LOG_ERROR, "glob failed for %s", pattern); + if (r == GLOB_NOMATCH) + goto out; + if (r) + XL_LOG_ERRNO(ctx, XL_LOG_ERROR, "glob failed for %s", pattern); for...