summaryrefslogtreecommitdiffstats
path: root/daemon/debug.c
Commit message (Collapse)AuthorAgeFilesLines
* Update FSF address.Matthew Booth2011-11-081-1/+1
|
* Fix debug help error message.Matthew Booth2011-10-311-1/+1
| | | | | | | | | | | When given an invalid debug command, libguestfs responds with the error message: libguestfs: error: debug: use 'debug help' to list the supported commands However this command does not work, as debug requires two arguments. This change updates the message to prompt the user to use 'debug help 0'.
* Add regression test to catch missing libraries in the appliance.Richard W.M. Jones2011-08-021-0/+71
| | | | Related to RHBZ#727178.
* Coverity: Remove unreachable code.Richard W.M. Jones2011-06-091-4/+0
|
* proto: Fix both-ends-cancel case.Richard W.M. Jones2011-03-181-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the case where both ends cancel at the same time (eg. both ends realize there are errors before or during the transfer), previously we skipped sending back an error from the daemon, on the spurious basis that the library would not need it (the library is cancelling because of its own error). However this is wrong: we should always send back an error message from the daemon in order to preserve synchronization of the protocol. A simple test case is: $ guestfish -N fs -m /dev/sda1 upload nosuchfile / libguestfs: error: open: nosuchfile: No such file or directory libguestfs: error: unexpected procedure number (66/282) (Notice two things: there are errors at both ends, and the loss of synchronization). After applying this commit, the loss of synchronization does not occur and we just see the library error: $ guestfish -N fs -m /dev/sda1 upload nosuchfile / libguestfs: error: open: nosuchfile: No such file or directory The choice of displaying the library or the daemon error is fairly arbitrary in this case -- it would be valid to display either or even to combine them into one error. Displaying the library error only makes the code considerably simpler. This commit also (re-)enables a test for this case.
* daemon: Don't use ../src path to include generator_protocol.hRichard W.M. Jones2010-11-031-1/+1
| | | | | This file is already hard-linked into the current directory, so the relative path is not required.
* debug: Add qtrace <device> on|off to allow selective traces.Richard W.M. Jones2010-10-061-0/+91
|
* debug: Add 'debug progress' command.Richard Jones2010-09-011-0/+33
| | | | | This debugging command generates progress notification messages, used for testing purposes.
* debug: Arrange prototypes in alphabetical order.Richard Jones2010-09-011-1/+1
|
* daemon: Enable debug command by default.Richard Jones2010-09-011-25/+7
| | | | | | | The debug command is useful for internal testing, and so should be enabled by default in all builds. Note that it is still *not* part of the stable ABI.
* Add a core_pattern debug commandMatthew Booth2010-08-261-0/+53
| | | | | | This adds a new debug command, core_pattern, which writes a new pattern for coredump files to the appliance kernel, and sets the daemon's hard and soft core limits to infinity.
* New API: debug-upload (not a formal part of the API/ABI).Richard Jones2010-04-191-9/+82
| | | | | | | | | | | | Allow arbitrary files to be uploaded into the appliance, but only when --enable-debug-command is enabled. This lets you run shell scripts, like this: ><fs> debug-upload -<<EOF /tmp/script.sh 0700 #!/bin/sh - # ... EOF ><fs> debug sh "/tmp/script.sh"
* daemon: Don't need to prefix error messages with the command name.Richard Jones2010-02-121-1/+1
| | | | | | | | | | | | | | | | | | | | The RPC stubs already prefix the command name to error messages. The daemon doesn't have to do this. As a (small) benefit this also makes the daemon slightly smaller. Code in the daemon such as: if (argv[0] == NULL) { reply_with_error ("passed an empty list"); return NULL; } now results in error messages like this: ><fs> command "" libguestfs: error: command: passed an empty list (whereas previously you would have seen ..command: command:..)
* use STREQ, not strcmp: part 1Jim Meyering2009-11-091-1/+1
| | | | | git grep -l 'strcmp *([^=]*== *0'|xargs \ perl -pi -e 's/\bstrcmp( *\(.*?\)) *== *0/STREQ$1/g'
* convert uses of strcasecmp to STRCASEEQJim Meyering2009-11-091-1/+1
| | | | | git grep -l 'strcasecmp *([^=]*== *0'| xargs \ perl -pi -e 's/\bstrcasecmp( *\(.*?\)) *== *0/STRCASEEQ$1/'
* Implement 'debug ls' and 'debug ll' commands.Richard Jones2009-08-181-0/+64
| | | | These commands can be used to list files in the appliance.
* adjust const "**" pointers to avoid warningsJim Meyering2009-08-171-1/+1
| | | | | | Also, ... * src/generator.ml: Add DeviceList type, and propagate that change out to all calling/interface code.
* generator.ml: use new "Pathname" designationJim Meyering2009-08-131-1/+1
| | | | | | | | | | Nearly every file-related function in daemons/*.c is affected: Remove this pair of statements from each affected do_* function: - NEED_ROOT (return -1); - ABS_PATH (dir, return -1); and change the type of the corresponding parameter to "const char *". * src/generator.ml: Emit NEED_ROOT just once, even when there are two or more Pathname args.
* build: daemon/do_debug: parameters aren't always unusedJim Meyering2009-08-101-1/+7
| | | | | | | | | * daemon/debug.c (MAYBE_UNUSED): Define. (do_debug): Mark parameters as unused only when they really are unused. Spotted by Richard Jones. SCALAR(0xdd8370) prefer sizeof *VAR sizeof TYPE (no semantic change)
* build: avoid warnings in daemon/debug.cJim Meyering2009-08-101-1/+1
| | | | * daemon/debug.c (do_debug): Mark parameters as unused.
* Convert all TABs-as-indentation to spaces.Jim Meyering2009-08-031-5/+5
| | | | | | | | | | | Do it by running this command: [exempted files are matched via .x-sc_TAB_in_indentation] git ls-files \ | pcregrep -vf .x-sc_TAB_in_indentation \ | xargs pcregrep -l '^ *\t' \ | xargs perl -MText::Tabs -ni -le \ '$m=/^( *\t[ \t]*)(.*)/; print $m ? expand($1) . $2 : $_'
* remove trailing blanksJim Meyering2009-07-031-1/+1
|
* The 'debug sh' command now uses a real shell.Richard Jones2009-06-221-9/+33
|
* In the daemon, change all const char * parameters to char *.Richard Jones2009-06-101-1/+1
|
* Add 'debug env' command to print environment.Richard Jones2009-05-221-1/+23
|
* Generated code to support last 3 commits.Richard Jones2009-05-081-0/+10
|
* catsprintf leaks, use open_memstream instead.Richard W.M. Jones2009-04-231-10/+16
|
* Remove the 'debug mem' command, it's never going to work.Richard W.M. Jones2009-04-231-30/+0
|
* Implement 'debug sh' and 'debug fds' commands.Richard W.M. Jones2009-04-231-15/+101
|
* Add outline of 'debug' command.Richard W.M. Jones2009-04-231-0/+138