search for: nr_featur

Displaying 9 results from an estimated 9 matches for "nr_featur".

Did you mean: nr_feature
2015 Nov 05
0
[PATCH 2/2] actions: refactor available & feature_available
...#include "guestfs.h" +#include "guestfs-internal.h" #include "guestfs-internal-actions.h" +static struct cached_feature * +find_or_cache_feature (guestfs_h *g, const char *group) +{ + struct cached_feature *f; + size_t i; + int res; + + for (i = 0; i < g->nr_features; ++i) { + f = &g->features[i]; + + if (STRNEQ (f->group, group)) + continue; + + return f; + } + + res = guestfs_internal_feature_available (g, group); + if (res < 0) + return 0; /* internal_feature_available sent an error. */ + + g->features = safe_realloc (...
2015 Nov 04
2
[PATCH] tests/c-api: cache available features
...atch test with + | (_, IfAvailable group, _, _) -> StringSet.add group acc + | (_, (Always|IfNotCrossAppliance|Disabled), _, _) -> acc + ) acc tests + ) StringSet.empty all_functions in + let features = List.sort compare (StringSet.elements features) in + let nr_features = List.length features in + pr "size_t nr_features = %d;\n" nr_features; + pr "\n"; + pr "struct feature features[%d] = {\n" nr_features; + List.iter ( + fun feature -> + pr " { .name = \"%s\", .read = false, .available = false },\n&quo...
2015 Nov 05
4
[PATCH 1/2] actions: turn available & feature_available as non-daemon
Rename the current available and feature_available into internal daemon functions, and provide non-daemon functions wrapping them at library side. This will make it possible to e.g. add caching for them. Should be only refactoring, no actual behaviour change. --- daemon/available.c | 4 +- generator/actions.ml | 192 ++++++++++++++++++++++++++++----------------------- po/POTFILES |
2018 Sep 21
4
[PATCH v2] lib: Use qemu-img info -U option to avoid locking error.
...3 files changed, 44 insertions(+) diff --git a/lib/guestfs-internal.h b/lib/guestfs-internal.h index adeb9478a..c66c55e70 100644 --- a/lib/guestfs-internal.h +++ b/lib/guestfs-internal.h @@ -510,6 +510,9 @@ struct guestfs_h { /* Cached features. */ struct cached_feature *features; size_t nr_features; + + /* Used by lib/info.c. -1 = not tested or error; else 0 or 1. */ + int qemu_img_supports_U_option; }; /** diff --git a/lib/handle.c b/lib/handle.c index a47aaafab..297ff6d67 100644 --- a/lib/handle.c +++ b/lib/handle.c @@ -101,6 +101,8 @@ guestfs_create_flags (unsigned flags, ...)...
2012 Jul 13
1
LiblineaR: read/write model files?
How do I read/write liblinear models to files? E.g., if I train a model using the command line interface, I might want to load it into R to look the histogram of the weights. Or I might want to train a model in R and then apply it using a command line interface. -- Sam Steingold (http://sds.podval.org/) on Ubuntu 12.04 (precise) X 11.0.11103000 http://www.childpsy.net/
2018 Oct 02
0
Re: [PATCH v2] lib: Use qemu-img info -U option to avoid locking error.
...diff --git a/lib/guestfs-internal.h b/lib/guestfs-internal.h > index adeb9478a..c66c55e70 100644 > --- a/lib/guestfs-internal.h > +++ b/lib/guestfs-internal.h > @@ -510,6 +510,9 @@ struct guestfs_h { > /* Cached features. */ > struct cached_feature *features; > size_t nr_features; > + > + /* Used by lib/info.c. -1 = not tested or error; else 0 or 1. */ > + int qemu_img_supports_U_option; > }; > > /** > diff --git a/lib/handle.c b/lib/handle.c > index a47aaafab..297ff6d67 100644 > --- a/lib/handle.c > +++ b/lib/handle.c > @@ -101,6 +10...
2016 May 17
0
[PATCH 1/2] src: start unifying version handling
...umask.c \ wait.c \ whole-file.c \ + version.c \ libguestfs.syms libguestfs_la_CPPFLAGS = \ diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h index d4e4e3c..098fe20 100644 --- a/src/guestfs-internal.h +++ b/src/guestfs-internal.h @@ -509,6 +509,12 @@ struct guestfs_h size_t nr_features; }; +struct version { + int v_major; + int v_minor; + int v_micro; +}; + /* Per-filesystem data stored for inspect_os. */ enum inspect_os_format { OS_FORMAT_UNKNOWN = 0, @@ -623,6 +629,12 @@ struct guestfs_message_header; struct guestfs_message_error; struct guestfs_progress; +/* v...
2016 May 17
3
[PATCH 0/2] src: introduce an helper version struct
Hi, this adds an helper version struct, and uses it in the backends (for the libvirt and qemu versions) and inspection code. This also moves common code to that, so it is not repeated in many places. This should help with the small refactoring proposed with https://www.redhat.com/archives/libguestfs/2016-May/msg00070.html Thanks, Pino Toscano (2): src: start unifying version handling
2016 May 18
3
[PATCH v2 0/2] src: introduce an helper version struct
Hi, this adds an helper version struct, and uses it in the backends (for the libvirt and qemu versions) and inspection code. This also moves common code to that, so it is not repeated in many places. This should help with the small refactoring proposed with https://www.redhat.com/archives/libguestfs/2016-May/msg00070.html Thanks, Pino Toscano (2): src: start unifying version handling