summaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* FAQ: Add Gentoo (thanks Agostino Sarubbo).Richard W.M. Jones2012-06-261-0/+6
|
* FAQ: Mention update-guestfs-appliance (thanks Steven Dake).Richard W.M. Jones2012-06-191-0/+4
|
* doc: Add documentation covering use of utf8 option when mounting vfat ↵Richard W.M. Jones2012-05-251-0/+77
| | | | (RHBZ#823887).
* FAQ: Add section about using libguestfs in closed source programs.Richard W.M. Jones2012-05-231-0/+9
|
* FAQ: Add a note about "child process died unexpectedly".Richard W.M. Jones2012-05-231-0/+12
| | | | | This is a common search term on the main website, and there is no good information provided by Google at present.
* FAQ: Update Ubuntu instructions.Richard W.M. Jones2012-05-231-4/+24
|
* examples: Further fixes to mount-local example program.Richard W.M. Jones2012-05-141-5/+26
| | | | | | | * Set PS1 prompt properly for bash shells. * Touch a file into the root directory of the new filesystem. This fixes commit 46b6766156ace142443b36e20e55074c544ae6cc.
* example: Various fixes to mount-local example program.Richard W.M. Jones2012-05-141-6/+31
| | | | | | | | | * Move MOUNT_OPTIONS to #define at top. * Move SIZE_MB to #define at top. * Set PS1 in subshell (doesn't work - why?). * Hide libguestfs errors from guestfs_mount_local_run. This fixes commit 46b6766156ace142443b36e20e55074c544ae6cc.
* debian: examples: Don't break when O_CLOEXEC is not defined.Richard W.M. Jones2012-05-141-0/+4
| | | | | | This affected Debian 6. This fixes commit 46b6766156ace142443b36e20e55074c544ae6cc.
* examples: Add mount options "acl,user_xattr" to mount-local example.Richard W.M. Jones2012-05-131-1/+1
| | | | This fixes commit 46b6766156ace142443b36e20e55074c544ae6cc.
* examples: Add an example of using the mount-local API from C.Richard W.M. Jones2012-05-132-0/+171
|
* examples: Add if HAVE_HIVEX ... endif around virt_dhcp_address example.Richard W.M. Jones2012-05-131-0/+2
|
* FAQ: Fix typo in download (thanks badnews@IRC)Richard W.M. Jones2012-05-101-2/+2
|
* Turn libguestfs FAQ into a man page: guestfs-faq(1).Richard W.M. Jones2012-05-012-0/+570
|
* New man page: guestfs-performance(1).Richard W.M. Jones2012-04-112-0/+409
| | | | This contains tips for engineering libguestfs for greatest performance.
* example: Copying a directory between two guests using threads.Richard W.M. Jones2012-03-092-0/+308
|
* Check return values of guestfs_inspect_get_{type,distro} (found by Coverity).Richard W.M. Jones2012-03-081-0/+4
| | | | | | | | | Error: NULL_RETURNS: /builddir/build/BUILD/libguestfs-1.16.5/examples/virt-dhcp-address.c:129: var_assigned: Assigning: "guest_distro" = null return value from "guestfs_inspect_get_distro". /builddir/build/BUILD/libguestfs-1.16.5/examples/virt-dhcp-address.c:131: dereference: Dereferencing a pointer that might be null "guest_distro" when calling "__coverity_strcmp". [...] /builddir/build/BUILD/libguestfs-1.16.5/examples/virt-dhcp-address.c:126: var_assigned: Assigning: "guest_type" = null return value from "guestfs_inspect_get_type". /builddir/build/BUILD/libguestfs-1.16.5/examples/virt-dhcp-address.c:128: dereference: Dereferencing a pointer that might be null "guest_type" when calling "__coverity_strcmp".
* Add 'display_icon' example program.Richard W.M. Jones2012-03-072-1/+140
| | | | | Running this on a disk image displays the guest icon (using external 'display' program).
* examples: code cleanupsWanlong Gao2012-01-312-2/+2
| | | | | | do a code cleanup by removing the tailing spaces Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
* Tempus fugit.Richard W.M. Jones2012-01-182-2/+2
| | | | Update all copyright dates to 2012.
* df, testing: Add notes on virt-df numbers (thanks Kashyap Chamarthy).Richard W.M. Jones2011-11-221-1/+23
|
* guestfs-testing: Link to libguestfs-test-tool.Richard W.M. Jones2011-11-211-0/+5
|
* Add guestfs-testing(1) man page.Richard W.M. Jones2011-11-202-4/+309
| | | | This contains suggested manual tests that users can run.
* Update FSF address.Matthew Booth2011-11-081-1/+1
|
* Add Erlang bindings.Richard W.M. Jones2011-09-212-0/+2
|
* out-of-tree build: remove unneeded explicit pathsHilko Bengen2011-08-171-2/+2
|
* recipes: Remove two C file dependencies which are not actually used in the POD.Richard W.M. Jones2011-08-151-1/+1
|
* out-of-tree build: fix documentation generationHilko Bengen2011-08-151-6/+6
|
* java: Add guestfs-java(3) man page.Richard W.M. Jones2011-07-192-0/+2
|
* recipes: in tr command \000 should be \0Richard W.M. Jones2011-06-031-1/+1
|
* Add new guestfs-rescue(1) man page with recipes.Richard W.M. Jones2011-05-183-4/+440
|
* guestfs-examples(3): Remove link to OCaml homepage.Richard W.M. Jones2011-05-181-2/+1
|
* Enable deprecation warnings on all C programs.Richard W.M. Jones2011-05-171-0/+3
|
* New API: inspect-get-windows-current-control-setRichard W.M. Jones2011-04-051-23/+8
| | | | | | | | | | | | | | This returns the actual registry key corresponding to CurrentControlSet (eg. it might be "ControlSet001"). Previously the inspection code was hard-coding ControlSet001. Now we use the correct control set, and also make it available to callers through the API. This commit also updates the virt-dhcp-address example so it uses this new API. virt-inspector displays the current control set when available.
* examples: Add virt-dhcp-address program.Richard W.M. Jones2011-03-312-0/+354
| | | | | | This is like the mythical 'virt-ifconfig'. There is not enough certainty around the right way to be doing this for us to make a full virt tool for this. Therefore the code is just an example.
* examples: Use WARN_CFLAGS, WERROR_CFLAGS macros instead of -WallRichard W.M. Jones2011-03-311-5/+11
|
* examples: size_t-correctness change in inspect_vm.cRichard W.M. Jones2011-03-311-2/+2
|
* perl: Translate C examples into Perl and include a manual page.Richard W.M. Jones2011-01-301-0/+1
|
* fish: Don't fail if some mountpoints in /etc/fstab are bogus (RHBZ#668574).Richard W.M. Jones2011-01-111-2/+4
| | | | | | | | | | | | | | | | | Fix guestfish (and other C tools) so that they ignore errors when /etc/fstab contains bogus entries. Update the documentation for inspect-get-mountpoints to emphasize that callers must be aware of this when mounting the returned values. Add a regression test. Update the example code ("inspect_vm") to reflect the way this API ought to be called. For more detail see: https://bugzilla.redhat.com/show_bug.cgi?id=668574
* ruby: Translate C examples into Ruby and include documentation.Richard W.M. Jones2010-11-241-0/+1
|
* python: Translate C examples into Python and include documentation.Richard W.M. Jones2010-11-241-0/+1
|
* docs: Standard C examples, and guestfs-examples(3) man page.Richard W.M. Jones2010-11-248-276/+361
|
* generator: Optional arguments, add-drive-opts (RHBZ#642934,CVE-2010-3851).Richard W.M. Jones2010-10-222-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This large commit changes the generator so that optional arguments can be supported for functions. The model for arguments (known as the "style") is changed from (ret, args) to (ret, args, optargs) where optargs is a more limited list of arguments. One function has been added which takes optional arguments, it is "add-drive-opts", modelled as: (RErr, [String "filename"], #required [Bool "readonly"; String "format"; String "iface"]) #optional Note that this function is processed in the library (does not go over the RPC protocol to the daemon). This has allowed us to simplify the current implementation by omitting changes related to RPC or the daemon, although we plan to add these at some point in the future. From C this function can be called in 3 different ways as in these examples: guestfs_add_drive_opts (g, filename, GUESTFS_ADD_DRIVE_OPTS_READONLY, 1, GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw", -1); (the argument(s) between 'filename' and '-1' are the optional ones). guestfs_add_drive_opts_va (g, filename, args); where 'args' is a va_list. This works like the first version. struct guestfs_add_drive_opts_argv optargs = { .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK, .readonly = 1, } guestfs_add_drive_opts_argv (g, filename, &optargs); This last form lets you construct lists of optional arguments, and is used by guestfish and the language bindings. In guestfish optional arguments are used like this: add-drive-opts filename readonly:true In OCaml these are mapped naturally to OCaml optional arguments, eg: g#add_drive_opts ~readonly:true filename; In Perl these are mapped to extra arguments, eg: $g->add_drive_opts ($filename, readonly => 1); In Python these are mapped to optional arguments, eg: g.add_drive_opts ("file", readonly = 1, format = "qcow2") In Ruby these are mapped to a final hash argument, eg: g.add_drive_opts("file", {}) g.add_drive_opts("file", :readonly => 1) g.add_drive_opts("file", :readonly => 1, :iface => "virtio") In PHP these are mapped to extra parameters. This is not quite accurate since you cannot omit arbitrary optional parameters, but there's not much than can be done within the limitations of PHP as a language. Unimplemented in: Haskell, C#, Java.
* maint: use EXIT_SUCCESS and EXIT_FAILURE, not 0 and 1 to exitJim Meyering2009-11-202-9/+9
| | | | | | | | | | | | | | | Convert all uses automatically, via these two commands: git grep -l '\<exit *(1)' \ | grep -vEf .x-sc_prohibit_magic_number_exit \ | xargs --no-run-if-empty \ perl -pi -e 's/\b(exit ?)\(1\)/$1(EXIT_FAILURE)/' git grep -l '\<exit *(0)' \ | grep -vEf .x-sc_prohibit_magic_number_exit \ | xargs --no-run-if-empty \ perl -pi -e 's/\b(exit ?)\(0\)/$1(EXIT_SUCCESS)/' * .x-sc_prohibit_magic_number_exit: New file. Edit (RWMJ): Don't change Java code.
* build: Fix inter-directory dependenciesMatthew Booth2009-11-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds an explicit dependency on generator.ml for every file it generates, except java files. Java is left for another time because it's considerably trickier. It also adds a build rule for src/libguestfs.la so it can be rebuilt as required from other directories. It does this by creating a top level make file, subdir-rules.mk, which can be included from sub-directories. sub-directories need to define 'generator_built' to include local files which are built by generator.ml, and they will be updated automatically. This fixes parallel make, and will automatically re-create generated files when make is run from any directory. It also fixes the problem which efad4f53 was targetting. Specifically, src/guestfs_protocol.(c|h) had an erroneous dependency on stamp-generator, and therefore generator.ml, despite not being directly created by it. This caused them to be recreated every time generator.ml ran rather than only when src/guestfs_protocol.x was updated, which cascaded into a daemon and therefore appliance update. This patch also changes the contents of the distribution tarball by including files created by rpcgen.
* examples: Don't use STREQ etc in the to-xml.c example.Richard Jones2009-11-101-8/+8
|
* use STREQ, not strcmp: part 1Jim Meyering2009-11-091-3/+3
| | | | | git grep -l 'strcmp *([^=]*== *0'|xargs \ perl -pi -e 's/\bstrcmp( *\(.*?\)) *== *0/STREQ$1/g'
* change strncmp() == 0 to STREQLEN()Jim Meyering2009-11-091-4/+4
| | | | | git grep -l 'strncmp *([^=]*== *0'|xargs \ perl -pi -e 's/\bstrncmp( *\(.*?\)) *== *0\b/STREQLEN$1/g'
* change strncmp(...) != 0 to STRNEQLEN(...)Jim Meyering2009-11-091-1/+1
| | | | | git grep -l 'strncmp *([^=]*!= *0'|xargs \ perl -pi -e 's/\bstrncmp( *\(.*?\)) *!= *0/STRNEQLEN$1/g'
* examples/to-xml.c: Don't depend on Gnulib function.Richard Jones2009-11-021-2/+2
| | | | | Since this program is just an example, it shouldn't require the Gnulib c-ctype functions.