search for: status_str

Displaying 20 results from an estimated 23 matches for "status_str".

Did you mean: status_ptr
2015 Nov 23
1
[PATCH] fuse: fix return value of guestunmount for unmounted paths
...9;t a FUSE mountpoint. */ close (pipefd[1]); @@ -117,10 +117,10 @@ main (int argc, char *argv[]) perror ("waitpid"); exit (EXIT_FAILURE); } - if (!WIFEXITED (status) || WEXITSTATUS (status) != 2) { + if (!WIFEXITED (status) || WEXITSTATUS (status) != 3) { char status_string[80]; - fprintf (stderr, "%s: test failed: guestunmount didn't return status code 2; %s\n", + fprintf (stderr, "%s: test failed: guestunmount didn't return status code 3; %s\n", guestfs_int_program_name, guestfs_int_exit_status_to_st...
2015 Oct 05
0
[PATCH 2/2] Fix whitespace.
.../man.c index f1ba1a4..f16bd42 100644 --- a/fish/man.c +++ b/fish/man.c @@ -56,8 +56,8 @@ run_man (const char *cmd, size_t argc, char *argv[]) fprintf (stderr, "%s\n", guestfs_int_exit_status_to_string (r, "man", - status_string, - sizeof status_string)); + status_string, + sizeof status_string)); return -1; } diff --git a/fish/uri.c b/fish/uri.c index 593e62a..33e820c 100644 --- a/fish/uri.c +++ b/fish/uri.c @@ -101,7 +101,7 @@ is_uri (const char *arg)...
2007 Mar 05
2
Scheduled workers only run once unless you call self.delete inside the worker
...to :args @progress = 0 @description = "Checking for eBay auctions and posting" logger.info("Checking to post an auction at #{Time.now.to_s}.") auction = EbayAuction.find(:first, :conditions => ["auction_status = ? AND post_on < ?", EbayAuction::STATUS_STRINGS[:queued], Time.now]) if auction logger.info("--- Posting auction: #{auction.title}") auction.post else logger.info("--- No auctions currently need posting.") end @progress = 100 logger.info("--- Finished auction check.")...
2015 Oct 05
3
[PATCH 1/2] Change 'fprintf (stdout,...)' -> printf.
Result of earlier copy and paste. --- align/scan.c | 35 ++++++++++--------- cat/cat.c | 39 +++++++++++---------- cat/filesystems.c | 69 +++++++++++++++++++------------------- cat/log.c | 35 ++++++++++--------- cat/ls.c | 61 +++++++++++++++++---------------- df/main.c | 43 ++++++++++++------------ diff/diff.c | 67
2015 Sep 29
8
[PATCH 0/7] copy-in/copy-out: Capture errors from tar subprocess (RHBZ#1267032).
Commits 3c27f3d91e1566854747bbe844186783fc84f3a8 and 1b6f0daa9ae7fcc94e389232d0c397816cda973d added an internal API for running commands asynchronously. It is only used by the copy-in and copy-out APIs. Unfortunately this made the command code very complex: it was almost impossible to redirect stderr to a file, and there were a lot of long-range dependencies through the file. It was also buggy:
2017 Oct 06
0
[PATCH v2 1/2] lib: command: If command fails, exit with 126 or 127 as defined by POSIX.
...ertions(+), 2 deletions(-) diff --git a/lib/command.c b/lib/command.c index 3d8bc7dbf..36f953dcf 100644 --- a/lib/command.c +++ b/lib/command.c @@ -539,7 +539,7 @@ static void run_child (struct command *cmd) { struct sigaction sa; - int i, fd, max_fd, r; + int i, err, fd, max_fd, r; char status_string[80]; #ifdef HAVE_SETRLIMIT struct child_rlimits *child_rlimit; @@ -614,8 +614,12 @@ run_child (struct command *cmd) switch (cmd->style) { case COMMAND_STYLE_EXECV: execvp (cmd->argv.argv[0], cmd->argv.argv); + err = errno; perror (cmd->argv.argv[0]); - _exit...
2009 Sep 22
0
[PATCH server] small formatting fix to host details pane
...git a/src/app/views/host/show.rhtml b/src/app/views/host/show.rhtml index ddc6481..49ac4c1 100644 --- a/src/app/views/host/show.rhtml +++ b/src/app/views/host/show.rhtml @@ -62,13 +62,13 @@ <%=h @host.arch %><br/> <%=h @host.hypervisor_type %><br/> <%=h @host.status_str %><br/> + <%= @host.vms.collect{|x| x.uuid }.join(" ") %><br/> <%= @host.nics.collect{ |n| n.interface_name.to_s + " " + n.mac + (n.network.nil? ? "" : " " + n.network.name) - }....
2015 May 26
0
[PATCH] lib: Limit space and time used by 'qemu-img info' subprocess.
...L-terminating the argv array or * adding a terminating \0 to the string, or die with an internal * error if no command has been added. @@ -390,6 +422,10 @@ run_command (struct command *cmd, bool get_stdin_fd, bool get_stdout_fd, int outfd[2] = { -1, -1 }; int infd[2] = { -1, -1 }; char status_string[80]; +#ifdef HAVE_SETRLIMIT + struct child_rlimits *child_rlimit; + struct rlimit rlimit; +#endif get_stdout_fd = get_stdout_fd || cmd->stdout_callback != NULL; get_stderr_fd = get_stderr_fd || cmd->capture_errors; @@ -510,6 +546,23 @@ run_command (struct command *cmd, bool get_s...
2016 Sep 08
4
[PATCH 0/3] Use gnulib's getprogname
Hi, this series update libguestfs to a recent gnulib version, so that we can use its new getprogname module, and solve altogether one of the porting issues (the need for 'program_name' by the error module of gnulib), and have a single way to get the name of the current program. A number of changes in tools mostly, although mechanical. Thanks, Pino Toscano (3): Update gnulib to latest
2007 Mar 13
3
Scheduled worker dies after about 30-45 runs
...to :args @progress = 0 @description = "Checking for eBay auctions and posting" logger.info("Checking to post an auction at #{Time.now.to_s}.") auction = EbayAuction.find(:first, :conditions => ["auction_status = ? AND post_on < ?", EbayAuction::STATUS_STRINGS[:queued], Time.now]) if auction logger.info("--- Posting auction: #{auction.title}") # This method only takes 1-3 seconds tops to run -- it just generates an <AddItem> call to eBay''s XML API, and sends it along. auction.post else logger....
2015 Feb 14
2
[PATCH 0/2] Change guestfs__*
libguestfs has used double and triple underscores in identifiers. These aren't valid for global names in C++. (http://stackoverflow.com/a/228797) These large but completely mechanical patches change the illegal identifiers to legal ones. Rich.
2017 Oct 06
3
[PATCH v2 0/2] lib: Allow db_dump package to be a weak dependency
Previously posted: https://www.redhat.com/archives/libguestfs/2017-October/msg00032.html This takes a completely different approach. It turns out that POSIX / the shell already defines a special exit code 127 for ‘command not found’. We can make a small adjustment to lib/command.c to return this exit code in that case. Then we just have to modify the db_dump code to test for this exit code. I
2016 Mar 06
8
[PATCH 0/5] Use less stack.
Various changes/fixes to use smaller stack frames. Rich.
2015 Feb 02
8
[PATCH 0/7 v2] Make copy_in & copy_out APIs, and use copy_in in customize
Hi, attached there is the second version of the patch series adding copy_in and copy_out in the library, mostly moving them from guestfish. It also adds the copy_in usage in virt-customize, as aid in a new image building. Thanks, Pino Toscano (7): cmd: add a way to run (and wait) asynchronously commands cmd: add a child-setup callback cmd: add the possibility to get a fd to the process
2015 Jan 26
6
[PATCH 1/6] cmd: add a way to run (and wait) asynchronously commands
...mmand (struct command *cmd) } static int -run_command (struct command *cmd) +run_command (struct command *cmd, bool get_stdout_fd, bool get_stderr_fd) { struct sigaction sa; int i, fd, max_fd, r; @@ -368,8 +368,11 @@ run_command (struct command *cmd) int outfd[2] = { -1, -1 }; char status_string[80]; + get_stdout_fd = get_stdout_fd || cmd->stdout_callback != NULL; + get_stderr_fd = get_stderr_fd || cmd->capture_errors; + /* Set up a pipe to capture command output and send it to the error log. */ - if (cmd->capture_errors) { + if (get_stderr_fd) { if (pipe2 (errorf...
2016 Mar 07
2
[PATCH v2] Use less stack.
...n -1; diff --git a/src/errors.c b/src/errors.c index 6162083..c85aed5 100644 --- a/src/errors.c +++ b/src/errors.c @@ -328,7 +328,7 @@ guestfs_int_external_command_failed (guestfs_h *g, int status, const char *cmd_name, const char *extra) { size_t len = 80 + strlen (cmd_name); - char status_string[len]; + CLEANUP_FREE char *status_string = safe_malloc (g, len); guestfs_int_exit_status_to_string (status, cmd_name, status_string, len); diff --git a/src/inspect-apps.c b/src/inspect-apps.c index b54cf07..71efa75 100644 --- a/src/inspect-apps.c +++ b/src/inspect-apps.c @@ -660,14 +660,...
2011 Feb 04
0
Wine release 1.3.13
...wininet: Added more InternetCloseHandle tests. wininet: Moved creation of an object and allocating handles to common function. mshtml: Don't try forwarding calls to Gecko that are not implemented there anyways. wininet: Moved freeing object to WININET_Release. wininet: status_string clean up. mshtml: Added nsIURI::SetSpec implementation. Joris Huizer (1): rpcrt4: Reduce scope of variable (Clang). Juan Lang (7): crypt32/tests: Test return value rather than output buffer before checking buffer contents (clang). crypt32/tests: Test some return values...
2012 Mar 08
18
some fixes, improvements, and new features (EPO and DYING) for NUT
Here are a series of my recent changes to NUT. The first few in the set are primarily little fixes and improvements. In among those are a few for .gitignore files which of course you can ignore for SVN, and there's one for a commit to a generated file which of course should not be tracked in any VCS. Then there are a couple or three to do with generating the header files used by
2009 Jun 30
0
[PATCH server] permit many-to-many vms / networks relationship
...nd(0xff) ].collect {|x| "%02x" % x}.join(":") - end - end - end diff --git a/src/app/views/host/show.rhtml b/src/app/views/host/show.rhtml index f706761..ddc6481 100644 --- a/src/app/views/host/show.rhtml +++ b/src/app/views/host/show.rhtml @@ -64,7 +64,7 @@ <%=h @host.status_str %><br/> <%= @host.nics.collect{ |n| n.interface_name.to_s + " " + n.mac + - (n.physical_network.nil? ? "" : " " + n.physical_network.name) + (n.network.nil? ? "" : " " + n.network.name)...
2016 Apr 04
2
[PATCH 1/2] Use 'error' function consistently throughout.
...str[64]; @@ -92,10 +89,8 @@ main (int argc, char *argv[]) sleep (2); r = waitpid (pid, &status, WNOHANG); - if (r == -1) { - perror ("waitpid"); - exit (EXIT_FAILURE); - } + if (r == -1) + error (EXIT_FAILURE, errno, "waitpid"); if (r != 0) { char status_string[80]; @@ -113,10 +108,8 @@ main (int argc, char *argv[]) close (pipefd[1]); r = waitpid (pid, &status, 0); - if (r == -1) { - perror ("waitpid"); - exit (EXIT_FAILURE); - } + if (r == -1) + error (EXIT_FAILURE, errno, "waitpid"); if (!WIFEXITED (st...