summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* guestfish: Use xstrtol to parse integers (RHBZ#557655).Richard Jones2010-01-258-5/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current code uses atoi to parse the generator Int type and atoll to parse the generator Int64 type. The problem with the ato* functions is that they don't cope with errors very well, and they cannot parse numbers that begin with 0.. or 0x.. for octal and hexadecimal respectively. This replaces the atoi call with a call to Gnulib xstrtol and the atoll call with a call to Gnulib xstrtoll. The generated code looks like this for all Int arguments: { strtol_error xerr; long r; xerr = xstrtol (argv[0], NULL, 0, &r, ""); if (xerr != LONGINT_OK) { fprintf (stderr, _("%s: %s: invalid integer parameter (%s returned %d)\n"), cmd, "memsize", "xstrtol", xerr); return -1; } /* The Int type in the generator is a signed 31 bit int. */ if (r < (-(2LL<<30)) || r > ((2LL<<30)-1)) { fprintf (stderr, _("%s: %s: integer out of range\n"), cmd, "memsize"); return -1; } /* The check above should ensure this assignment does not overflow. */ memsize = r; } and like this for all Int64 arguments (note we don't need the range check for these): { strtol_error xerr; long long r; xerr = xstrtoll (argv[1], NULL, 0, &r, ""); if (xerr != LONGINT_OK) { fprintf (stderr, _("%s: %s: invalid integer parameter (%s returned %d)\n"), cmd, "size", "xstrtoll", xerr); return -1; } size = r; } Note this also fixes an unrelated bug in guestfish handling of RBufferOut. We were using 'fwrite' without checking the return value, and this could have caused silent failures, eg. in the case where there was not enough disk space to store the resulting file, or even if the program was interrupted (but continued) during the write. Replace this with Gnulib 'full-write', and check the return value and report errors.
* Add 'filesize' call.Richard Jones2010-01-253-1/+31
| | | | | Returns the size of a file. You can already do this with 'stat', but this call is good for scripting.
* Missing crc kernel module on RHEL 6 / Linux 2.6.32 (fixes RHBZ#557195)Richard Jones2010-01-211-2/+3
|
* hivex: Various improvements in header parsing, thanks to better documentation.Richard Jones2010-01-151-22/+74
|
* hivex: Print header fields. Print all offsets in hex (in debug output).Richard Jones2010-01-151-16/+26
|
* hivex: Reenable checksum calculations, but don't check result.Richard Jones2010-01-151-3/+4
|
* hivex: Update documentation.Richard Jones2010-01-151-0/+4
|
* hivex: Send all debug messages to stderr.Richard Jones2010-01-141-55/+55
|
* hivex: Remove stray debugging message.Richard Jones2010-01-141-1/+0
|
* hivex: Documentation: Add environment variables section.Richard Jones2010-01-141-0/+11
|
* hivex: Whitespace change.Richard Jones2010-01-141-1/+1
|
* hivex: Move STR* macros into C file.Richard Jones2010-01-142-10/+10
| | | | Don't pollute the public header file with these macros.
* hivex: Small updates to the documentation.Richard Jones2010-01-142-8/+92
|
* Fix generation of HTML documentation for website.Richard Jones2010-01-131-4/+4
|
* Add guestfs.pod and guestfish.pod to EXTRA_DIST.1.0.81Richard Jones2010-01-132-2/+4
|
* Prepare for version 1.0.81.Richard Jones2010-01-133-654/+654
|
* Update to latest Gnulib.Richard Jones2010-01-134-2/+9
|
* qemu: Upstream regression of -stdio serial option.Richard Jones2010-01-071-4/+17
| | | | | | | | | | | | | Best explained by the comment in the code: /* Newer versions of qemu (from around 2009/12) changed the * behaviour of monitors so that an implicit '-monitor stdio' is * assumed if we are in -nographic mode and there is no other * -monitor option. Only a single stdio device is allowed, so * this broke the '-serial stdio' option. There is a new flag * called -nodefaults which gets rid of all this default crud, so * let's use that to avoid this and any future surprises. */
* inspector: Update example XML and RNG schema.Richard Jones2010-01-063-4411/+13948
| | | | This updates commit a59dcdbd1b0a28c960e3792165a13f2daf4f6c35.
* inspector: Make RPM application data more specific (RHBZ#552718).Richard Jones2010-01-052-1/+4
| | | | | | | List applications with epoch, release and arch data. If epoch is 0, don't store this as an empty string, but as undefined, and don't output empty <epoch/> element in the XML.
* Use linker script to control visibility of symbols.Richard Jones2010-01-044-3/+60
|
* generator: Move all library generation code together.Richard Jones2010-01-041-1/+1
|
* generator: Print total lines of generated code.Richard Jones2010-01-041-2/+18
|
* C#: Add documentation about experimental nature of these bindings.Richard Jones2010-01-043-5/+40
|
* Experimental C# bindings.Richard Jones2010-01-024-7/+224
| | | | Tested in only limited situations, with Mono on Linux.
* Update copyright years.Richard Jones2010-01-021-1/+1
|
* Move guestfs(3) and guestfish(1) man pages into subdirectories.Richard Jones2009-12-317-58/+62
| | | | | | | | These manual pages have for a very long time 'lived' in the top source directory. Clean up this situation by moving those manual pages (plus associated generated files) into the src/ and fish/ subdirectories respectively.
* generator: Move src/guestfs-bindtests.c next to other src/ files.Richard Jones2009-12-311-1/+1
|
* generator: Use Continuation Passing Style (CPS) in output_to function.Richard Jones2009-12-311-175/+56
| | | | This makes the code simpler, shorter and less error-prone.
* generator: Rename GPLv2 to GPLv2plus, LGPLv2 to LGPLv2plus.Richard Jones2009-12-311-38/+38
| | | | | The licenses are "any later version", so reflect this in the naming of the parameter to generate_header.
* generated code: Set copyright years to 2009-xxxx when current year > 2009.Richard Jones2009-12-311-4/+8
|
* Remove separate inspector_generator.ml, combine this with generator.ml.Richard Jones2009-12-317-658/+516
| | | | | | | | | | | This commit combines the previously separate "inspector_generator.ml" program which generated bindings for virt-inspector. Having two separate programs caused no end of troubles for developers, so we now combine them into a single program. NOTE: OCaml xml-light is now *required* in order to rebuild the generated code.
* generator: Comment and whitespace changes only.Richard Jones2009-12-311-17/+24
|
* daemon: Work around udevsettle issue (RHBZ#548121).Richard Jones2009-12-181-21/+9
|
* Prepare for 1.0.80.1.0.80Richard Jones2009-12-161-1/+1
|
* Include latest Polish translations (Piotr Drąg, RHBZ#502533).Richard Jones2009-12-161-69/+77
|
* Update PO files.Richard Jones2009-12-162-779/+799
|
* build: Fix typo in filename.Richard Jones2009-12-161-1/+1
|
* build: Remove references to old contrib/ files which were removed.Richard Jones2009-12-161-3/+0
|
* appliance: Special case handling for libbfd in the supermin appliance.Richard Jones2009-12-161-0/+4
| | | | | | | | | | | The libbfd library has a constantly changing, non-standard and very long name, eg: /usr/lib64/libbfd-2.20.51.0.2-7.fc13.so Just add a special case to deal with this. This fixes the guestfs_strings command, which relies on the external strings binary which uses this library.
* appliance: Ignore unreadable dbus helper programs.Richard Jones2009-12-161-0/+2
|
* lib: Link with $(LTLIBTHREAD), required by Gnulib lock module.Richard Jones2009-12-071-1/+3
| | | | This fixes commit cada248a53858341c91f70392e8f5b6e47d9b4fe.
* appliance: Fix code which gets list of kernels.Matthew Booth2009-12-071-1/+4
| | | | | The first 'ls' command was failing, so the second 'ls' command would never run at all.
* accommodate leading "+" in git submodule outputJim Meyering2009-12-072-2/+2
| | | | | * cfg.mk (_submodule_hash): Also filter out "+". * autogen.sh: Likewise.
* lib: Add thread-safety to global list of handles.Richard Jones2009-12-073-9/+13
| | | | | | | | | | | | | | | | This commit uses the Gnulib 'lock' module to implement a mutex on the global list of handles which is stored by the library. Note that Gnulib nicely avoids explicitly linking with -lpthread unless the application program itself links to -lpthread. Locks are only enabled in multithreaded applications. $ ldd src/.libs/libguestfs.so.0.217.0 linux-vdso.so.1 => (0x00007fffcb7ff000) libc.so.6 => /lib64/libc.so.6 (0x00007f96a4e6c000) /lib64/ld-linux-x86-64.so.2 (0x00007f96a544d000) Please enter the commit message for your changes. Lines starting
* daemon error handling: Define a new function reply_with_perror_errno.Richard Jones2009-12-072-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | This allows you to save the errno from a previous call and pass it to reply_with_perror. For example, original code: r = some_system_call (); err = errno; do_cleanup (); errno = err; if (r == -1) { reply_with_perror ("failed"); return -1; } can in future be changed to: r = some_system_call (); err = errno; do_cleanup (); if (r == -1) { reply_with_perror_errno (err, "failed"); return -1; }
* daemon error handling: recursive_mkdir shouldn't need to set errno.Richard Jones2009-12-071-5/+11
|
* daemon error handling: Clear errno before calling stub functions.Richard Jones2009-12-041-1/+16
| | | | | | This just ensures that we accurately report errors, even if our error path code doesn't set errno. We won't end up with a bogus errno left over from a previous call.
* Whitespace change.Richard Jones2009-11-271-1/+1
|
* virt-rescue: Freshen documentation.Richard Jones2009-11-261-5/+12
|