search for: strs

Displaying 20 results from an estimated 72 matches for "strs".

Did you mean: str
2017 Feb 14
2
[PATCH 1/2] GCC 7: Add __attribute__((noreturn)) to some usage functions which call exit.
This happens with GCC 7.0.1. The errors were all of the form: qemu-speed-test.c: In function 'main': qemu-speed-test.c:153:7: error: this statement may fall through [-Werror=implicit-fallthrough=] usage (EXIT_SUCCESS); ^~~~~~~~~~~~~~~~~~~~ qemu-speed-test.c:155:5: note: here default: ^~~~~~~ --- builder/index-validate.c | 2 +-
2017 Feb 14
0
[PATCH 2/2] GCC 7: Allocate sufficient space for sprintf output.
...ace in the output buffer when using sprintf/snprintf, based on the format string. The errors were all either of this form: bindtests.c:717:29: error: '%zu' directive output may be truncated writing between 1 and 19 bytes into a region of size 16 [-Werror=format-truncation=] snprintf (strs[i], 16, "%zu", i); ^~~ bindtests.c:717:28: note: directive argument in the range [0, 2305843009213693951] snprintf (strs[i], 16, "%zu", i); ^~~~~ or this form: sync.c: In function 'fsync_devices': sync.c:10...
2017 Feb 14
0
[PATCH v2 2/2] GCC 7: Allocate sufficient space for sprintf output.
...ace in the output buffer when using sprintf/snprintf, based on the format string. The errors were all either of this form: bindtests.c:717:29: error: '%zu' directive output may be truncated writing between 1 and 19 bytes into a region of size 16 [-Werror=format-truncation=] snprintf (strs[i], 16, "%zu", i); ^~~ bindtests.c:717:28: note: directive argument in the range [0, 2305843009213693951] snprintf (strs[i], 16, "%zu", i); ^~~~~ or this form: sync.c: In function 'fsync_devices': sync.c:10...
2017 Feb 14
4
[PATCH v2 0/2] GCC 7: Misc fixes
v1 -> v2: - Use intprops macro suggested by danpb. Rich.
2014 Aug 18
3
[PATCH] drives: fix deletion of servers on error
Make sure to not skip any of the created server, and to always free the "server" array. diff --git a/src/drives.c b/src/drives.c index 4bd8328..85c1495 100644 --- a/src/drives.c +++ b/src/drives.c @@ -743,8 +743,7 @@ parse_servers (guestfs_h *g, char *const *strs, for (i = 0; i < n; ++i) { if (parse_one_server (g, strs[i], &servers[i]) == -1) { - if (i > 0) - free_drive_servers (servers, i-1); + free_drive_servers (servers, i); return -1; } } --- src/drives.c | 3 +-- 1 file changed, 1 insertion(+), 2 dele...
2004 Feb 19
1
piece wise application of functions
...quot; "spl.5mb" > ( In case it matters the functions accept and return one argument: block.size <- spl.1mb(ic) ) Then, I have 2 data frames with identical structure: > snps.missgp intvl.mb ic 1 1e+06 0.597 2 2e+06 0.504 3 5e+06 0.327 4 1e+07 0.204 > > strs.missgp intvl.mb ic 1 1e+06 0.67200 2 2e+06 0.62325 3 5e+06 0.51000 4 1e+07 0.38775 > I would like to apply the functions on these data frames piece-wise and create a data frame per function _list_. So I am looking for a final output like this: > case0 gap snps strs...
2010 Jun 01
2
[LLVMdev] How to create global string array? (user question)
...:get(Type::getInt32Ty(Context), 0, false)); return (GetElementPtrInst::Create( GV, idxs.begin(), idxs.end(), "gepi", (BasicBlock*)0 )); } main() { LLVMContext Context; Module *M = new Module("test", Context); // vector<Constant*> strs; strs.push_back(mk_string(M, Context, "s1")); strs.push_back(mk_string(M, Context, "s2")); ArrayType *Ty = ArrayType::get(Type::getInt8Ty(Context)->getPointerTo(),2); new llvm::GlobalVariable( *M, Ty, true, GlobalValue::InternalLinkage, C...
2020 Mar 12
0
[PATCH libguestfs 2/3] daemon: Add filter_list utility function.
...a/daemon/daemon.h +++ b/daemon/daemon.h @@ -74,6 +74,7 @@ extern void free_stringsbuf (struct stringsbuf *sb); extern struct stringsbuf split_lines_sb (char *str); extern char **split_lines (char *str); extern char **empty_list (void); +extern char **filter_list (int (*p) (const char *), char **strs); extern int is_power_of_2 (unsigned long v); extern void trim (char *str); extern int parse_btrfsvol (const char *desc, mountable_t *mountable); diff --git a/daemon/utils.c b/daemon/utils.c index 1cf1b07f6..1fc8d2c80 100644 --- a/daemon/utils.c +++ b/daemon/utils.c @@ -482,6 +482,28 @@ empty_li...
2020 Mar 16
0
[PATCH libguestfs v2 2/3] daemon: Add filter_list utility function.
...rrno.h> #include <unistd.h> @@ -74,6 +75,7 @@ extern void free_stringsbuf (struct stringsbuf *sb); extern struct stringsbuf split_lines_sb (char *str); extern char **split_lines (char *str); extern char **empty_list (void); +extern char **filter_list (bool (*p) (const char *), char **strs); extern int is_power_of_2 (unsigned long v); extern void trim (char *str); extern int parse_btrfsvol (const char *desc, mountable_t *mountable); diff --git a/daemon/utils.c b/daemon/utils.c index 1cf1b07f6..21008b40e 100644 --- a/daemon/utils.c +++ b/daemon/utils.c @@ -24,6 +24,7 @@ #include...
2017 Feb 03
5
[PATCH 0/5] Support socket activation in virt-p2v.
As the subject says, support socket activation in virt-p2v. I have added upstream support for socket activation to nbdkit already: https://github.com/libguestfs/nbdkit/commit/7ff39d028c6359f5c0925ed2cf4a2c4c751af2e4 I posted a patch for qemu-nbd, still waiting on more reviews for that one: https://www.mail-archive.com/qemu-devel@nongnu.org/msg427246.html I tested this against old and new qemu
2009 Dec 09
4
binary string conversion to a vector (PR#14120)
...t; returns what I consider a wrong value -- see the terminal output binS2binV = function(string="0001101", sep="") # this procedure is expected to convert a binary string to a binary vector ... # but does it?? Why do we get a vector with quoted binary values?? { qlist = strsplit(string, sep) qvector = qlist[[1]] cat("\n string=", string) cat("\n qvector=", qvector) n = length(qvector) ; xvector = NULL for (i in 1:n) { tmp = noquote(qvector[i]) cat("\n", i,", tmp=", tmp) xvector = c(xvector, tmp) cat(&...
2009 Aug 17
1
two more warning-avoidance patches
...tic void print_strings (char *const *argv) { int argc; @@ -5869,7 +5869,7 @@ and generate_test_command_call ?(expect_error = false) ?test test_name cmd = fun i str -> pr " const char *%s_%d = \"%s\";\n" n i (c_quote str); ) strs; - pr " const char *%s[] = {\n" n; + pr " const char *const %s[] = {\n" n; iteri ( fun i _ -> pr " %s_%d,\n" n i ) strs; @@ -5912,7 +5912,7 @@ and generate_test_command_call ?(expect_error = f...
2020 Mar 16
6
[PATCH libguestfs v2 0/3] daemon: Fix various commands which break on NTFS-3g compressed files.
v1 here: https://www.redhat.com/archives/libguestfs/2020-March/msg00099.html This one fixes most of the points picked up in review, and does not strdup the strings which should keep down memory usage if that is a concern. Rich.
2017 Jan 26
3
[PATCH 0/3] p2v: Allow nbdkit as an alternative NBD server.
qemu-nbd is a fine NBD server. However it's not easy to compile a reliably working version on RHEL 5. This patch series allows nbdkit to be used as an alternative (qemu-nbd is still the default). Rich.
2020 Mar 12
8
[PATCH libguestfs 0/3] daemon: Fix various commands which break on NTFS-3g compressed files.
https://bugzilla.redhat.com/show_bug.cgi?id=1811539 Commands including virt-diff which read extended attributes will sometimes fail on NTFS filesystems that are using system compressed. The reason is complex, see comment 5 of the bug linked above. This patch filters out the troublesome xattr. For justification, see the comment I added in patch 3. Patch 1 & 2 are refactoring. I was on the
2014 Aug 22
4
[LLVMdev] Addressing const reference in ArrayRef
On Fri, Aug 22, 2014 at 10:16 AM, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote: >> On 2014-Aug-21, at 10:39, David Blaikie <dblaikie at gmail.com> wrote: >> >> On Thu, Aug 21, 2014 at 10:34 AM, Reid Kleckner <rnk at google.com> wrote: >>> Is there some way we can get lifetime extension of temporaries to kick in >>> here? >>
2018 Jan 22
2
[PATCH] lua, perl: Use thread-safe strerror_r instead of strerror (RHBZ#1536763).
...ode) { + ignore_value (strerror_r (code, err, sizeof err)); + lua_pushfstring (L, \"%%s: %%s\", msg, err); + } else lua_pushstring (L, msg); @@ -640,11 +647,12 @@ get_string_list (lua_State *L, int index) const size_t len = lua_objlen (L, index); size_t i; char **strs; + char err[128]; strs = malloc ((len+1) * sizeof (char *)); if (strs == NULL) { - luaL_error (L, \"get_string_list: malloc failed: %%s\", - strerror (errno)); + ignore_value (strerror_r (errno, err, sizeof err)); + luaL_error (L, \"get_string_list: m...
2011 Nov 21
1
[PATCH] Add MD devices to guestfish device autocompletion
--- fish/destpaths.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Add-MD-devices-to-guestfish-device-autocompletion.patch Type: text/x-patch Size: 400 bytes Desc: not available URL: <http://listman.redhat.com/archives/libguestfs/attachments/20111121/b667596b/attachment.bin>
2012 Dec 07
2
[PATCH] Add support for Windows dynamic disks (libldm / ldmtool).
This is just an initial version of the patch, not to be applied. It implements just the diskgroup functions, ie. corresponding to these ldmtool commands: * ldmtool scan * ldmtool show diskgroup <guid> I have chosen yajl as the JSON parsing library (don't worry, this is optional). You will also, of course, need ldmtool which is not packaged in anything except Fedora. Rich.
2016 Jul 07
0
[PATCH 2/2] daemon: fix cleanup of stringsbuf usages
...tringsbuf (&ret); error: globfree (&devs); - if (ret.argv != NULL) - free_stringslen (ret.argv, ret.size); return NULL; } @@ -176,7 +174,7 @@ parse_json (const char *json, const char *func) static char ** json_value_to_string_list (yajl_val node) { - DECLARE_STRINGSBUF (strs); + CLEANUP_FREE_STRINGSBUF DECLARE_STRINGSBUF (strs); yajl_val n; size_t i, len; @@ -194,7 +192,7 @@ json_value_to_string_list (yajl_val node) if (end_stringsbuf (&strs) == -1) return NULL; - return strs.argv; + return take_stringsbuf (&strs); } static char ** diff...