Commit Graph

1069 Commits

Author SHA1 Message Date
Richard W.M. Jones
2b891ceef3 mke2fs: Use e4fsprogs programs if available.
On RHEL 5, mke2fs is ancient, and there is a non-standard "mke4fs"
binary which acts like the more recent mke2fs on Fedora.  Since there
are several annoyances and actual bugs in the ancient RHEL 5 mke2fs,
use mke4fs instead if it's available.
2009-08-19 15:13:43 +01:00
Richard W.M. Jones
5da810b960 tests: modprobe fat instead of ext2 module.
On RHEL 5, ext2 is compiled into the kernel, so trying to modprobe
it will fail.  I've checked that fat.ko is always a module on the
platforms we care about (RHEL 5, Fedora 11, Debian), so use that
to test instead.
2009-08-19 15:13:37 +01:00
Richard W.M. Jones
9d04d360c6 tests: Conditionally skip UUID tests.
More tests introduced which break with old e2fsprogs that didn't
support UUIDs.  Skip those tests when the old platform is
detected.

Also tidy up this code a little.
2009-08-19 15:13:30 +01:00
Jim Meyering
64d042cb08 avoid build failure due to Haskell keyword clash
* src/generator.ml: Fix this particular problem by
renaming the "module" parameter to "modulename".
Avoid the general problem by ensuring that no parameter name is
in the set of nearly all Haskell, OCaml and C reserved words.
(zfile): Adjust one more offender: s/method/meth/.
2009-08-19 14:56:37 +02:00
Matthew Booth
569989b750 Export inspect_linux_kernel in Lib.pm 2009-08-19 12:53:17 +01:00
Matthew Booth
256c084a23 Add boot/grub_fs to output
If present, this gives the mount point of the filesystem which contains grub.
All entries in grub.conf will be relative to this filesystem.
2009-08-19 12:53:16 +01:00
Jim Meyering
6aa44937d5 guestfish: detect more failed syscalls
* fish/fish.c (issue_command): Detect/diagnose more failed syscalls.
2009-08-19 13:27:13 +02:00
Richard Jones
0f7656f287 Prepare for version 1.0.68. 2009-08-19 09:44:51 +01:00
Richard Jones
8f1b06f648 guestfs_launch: Correct checks for dup failure. 2009-08-19 09:37:44 +01:00
Richard Jones
e55c1fc51e Updated PO files. 2009-08-19 09:10:24 +01:00
Richard Jones
ab8edb0cf9 build: Comment out some unused macros.
GCC 4.4.1 warns about some unused macros.  Comment these out
while they are not used.
2009-08-19 09:09:47 +01:00
Jim Meyering
df63ba5e7d build: new configure-time option: --enable-gcc-warnings
* configure.ac: Define/configure it.
* src/Makefile.am: Use new variables.
2009-08-18 17:20:06 +02:00
Jim Meyering
f1b48465f7 suppress warnings from -Wmissing-noreturn
Even though these functions are marked as "not implemented yet",
and they will surely return a value once implemented, ...
* src/guestfs.c (select_add_timeout): Declare with noreturn attribute.
(select_remove_timeout): Likewise.
2009-08-18 17:20:06 +02:00
Jim Meyering
3fa23b14d2 suppress a warning from -Wswitch-default
* src/guestfs.c (guestfs_end_busy): Add a "default:" label.
2009-08-18 17:20:06 +02:00
Jim Meyering
d93a02ce3f suppress signed/unsigned-comparison warnings
* src/guestfs.c [struct guestfs_h] (msg_in_size, msg_in_allocated):
(msg_out_size, msg_out_allocated): Change type from int to unsigned int.
2009-08-18 17:20:06 +02:00
Jim Meyering
dd922bedb7 build: don't perform arithmetic on void* pointers
* src/guestfs.c (receive_file_data_sync, xread, xwrite): Use char*.
2009-08-18 17:20:06 +02:00
Jim Meyering
1821af4d61 generator.ml: suppress signed/unsigned-compare warnings
* src/generator.ml (check_reply_header): Emit parameter declarations
that are unsigned, so as to avoid signed/unsigned-compare warnings.
2009-08-18 17:20:06 +02:00
Jim Meyering
93ab20eb36 build: suppress an ignored-dup-return-value warning
* src/guestfs.c (guestfs_launch): Handle dup failure.
2009-08-18 17:20:06 +02:00
Jim Meyering
1d8afa2416 build: suppress an ignored-write-return-value warning
* bootstrap (modules): Add ignore-value.
* src/guestfs.c: Include "ignore-value.h".
(stdout_event): Ignore failure to write to stderr.
Also, prefer STDERR_FILENO over the literal "2".
* src/Makefile.am (libguestfs_la_CPPFLAGS): Include gnulib's .h files.
(libprotocol_la_CFLAGS): Remove -Wall -Wno-unused.
2009-08-18 17:20:06 +02:00
Matthew Booth
53ce488f38 New 'modprobe' command.
Allow kernel modules to be loaded into the appliance.
2009-08-18 15:19:55 +01:00
Jim Meyering
7b65b7d323 avoid compiler warnings about unused vars in generated code
* fish/Makefile.am: Compile rc_protocol.c into a convenience library,
so it can have its own CFLAGS, and link that into guestfish.

generator.ml: Use TABs, not spaces for indentation.
2009-08-18 10:20:16 +02:00
Richard Jones
a75756628f generator: Small code rearrangement.
Move code which updates pod2text memo file into a separate function.
2009-08-18 09:17:52 +01:00
Jim Meyering
9c5f05ec14 generator.ml: do not emit unused print_* functions
* src/generator.ml: Do not emit functions like print_xattr,
print_lvm_vg, print_inotify_event, that are not used.
2009-08-18 10:06:33 +02:00
Jim Meyering
8966b13766 generator.ml: do not emit unused print_*_list functions
* src/generator.ml (emit_print_list_function): New function.
Emit a function definition only if it will be used.
2009-08-18 10:06:33 +02:00
Jim Meyering
c3be5c3297 generator.ml: avoid warnings in generated tests.c
* src/generator.ml: Avoid warnings in generated tests.c, regarding
print_strings, and in exercising any function that takes a StringList
or DeviceList parameter.
(print_strings): Change param type to "char *const *s".
Declare fully-const initializer for each list-taking function use.
Cast *List argument to "(char **)".
2009-08-18 10:06:33 +02:00
Jim Meyering
5a07cdc358 avoid compiler warnings about unused vars in generated code
* src/Makefile.am: Compile protocol.c into a convenience library, so it
can have its own CFLAGS, and link that with the destination one.
2009-08-18 10:06:33 +02:00
Richard Jones
24a6cf4533 Implement 'debug ls' and 'debug ll' commands.
These commands can be used to list files in the appliance.
2009-08-18 08:56:18 +01:00
Jim Meyering
a578bd9c8e generator.ml: Use TABs, not spaces for indentation. 2009-08-17 21:14:53 +02:00
Richard W.M. Jones
59b26635a0 Ignore manywarnings.m4 / warnings.m4. 2009-08-17 12:27:43 +01:00
Richard W.M. Jones
722ff7a4bc java: Small fix to Java bindings.
Missing declaration of local variable 'i'.
2009-08-17 12:26:58 +01:00
Richard W.M. Jones
4d8efdd455 HACKING: Document make targets and ./configure --enable-gcc-warnings. 2009-08-17 12:23:32 +01:00
Richard W.M. Jones
d17bd636a8 Remove redundant macro. 2009-08-17 12:23:16 +01:00
Jim Meyering
9b41eeb917 indent with spaces, not TABs 2009-08-17 11:56:10 +02:00
Jim Meyering
9dd53bcb10 daemon: enable -Werror and many gcc warnings when --enable-gcc-warnings
* daemon/m4/gnulib-cache.m4: Add two modules: manywarnings, warnings.
* daemon/configure.ac: Implement --enable-gcc-warnings, and selectively
disable a few warning options that are either not useful or that provoke
too many warnings for now.
Define and AC_SUBST WARN_CFLAGS and WERROR_CFLAGS.
* daemon/Makefile.am (guestfsd_CFLAGS): Use $(WARN_CFLAGS)
and $(WERROR_CFLAGS), rather than just -Wall.
2009-08-17 11:40:24 +02:00
Jim Meyering
c36fa40b98 xattr.c: avoid warning about comparison between signed and unsigned
* daemon/xattr.c (getxattrs): Use an unsigned index.
2009-08-17 11:40:24 +02:00
Jim Meyering
fabf3f6615 guestfsd: don't ignore failed write-to-socket
* daemon/proto.c (reply): Fix typo that would cause us to ignore
failed write-to-socket.
2009-08-17 11:40:24 +02:00
Jim Meyering
82a5f441cc daemon.h: avoid warning about possible noreturn function
* daemon/daemon.h (main_loop): Use "noreturn" attribute.
2009-08-17 11:40:24 +02:00
Jim Meyering
9b0ab84185 sfdisk.c, fallocate.c: use a string literal as format
* daemon/fallocate.c (do_fallocate): Format was not a string literal.
* daemon/sfdisk.c (sfdisk): Likewise.
2009-08-17 11:40:24 +02:00
Jim Meyering
29e7b9908e wc, blockdev: avoid warnings about discarding "const" qualifiers
* daemon/wc.c (wc): Make "flag" param const.
* daemon/blockdev.c (call_blockdev): Likewise, for "switc".
2009-08-17 11:40:24 +02:00
Jim Meyering
5a9b41ed44 daemon/zero: don't ignore write and close errors
* daemon/zero.c (do_zero): Detect write and close errors.
2009-08-17 11:40:24 +02:00
Jim Meyering
ff2f3fc656 guestfsd.c: don't perform arithmetic on void pointers
* daemon/guestfsd.c (xread, xwrite): Use char* pointers instead.
2009-08-17 11:40:24 +02:00
Jim Meyering
e82d864e02 command.c: avoid shadowing a global function
* daemon/command.c (do_sh_lines, do_sh): Do not shadow global "command".
2009-08-17 11:40:24 +02:00
Jim Meyering
d7569c0078 avoid warning about old-style no-param function definition
* daemon/df.c (do_df, do_df_h): Add "void".
* sync.c (do_sync): Likewise.
2009-08-17 11:40:24 +02:00
Jim Meyering
7793f8eda6 generator.ml: emit slightly prettier code
* src/generator.ml: Emit a few omitted newlines.
2009-08-17 11:40:24 +02:00
Jim Meyering
31053d2027 python: avoid "_POSIX_C_SOURCE" redefinition warning
* src/generator.ml: Include <Python.h> *before* <stdio.h>
to avoid redefinition warning about "_POSIX_C_SOURCE".
2009-08-17 11:40:24 +02:00
Jim Meyering
adf20c0c4d adjust const "**" pointers to avoid warnings
Also, ...
* src/generator.ml: Add DeviceList type, and propagate that change
out to all calling/interface code.
2009-08-17 11:40:24 +02:00
Richard Jones
2ad9dbbe59 test-tool: Recognize '-t timeout' as an option. 2009-08-16 11:15:53 +01:00
Richard W.M. Jones
a61bccecfb New commands: mkfs-b, mke2journal*, mke2fs-J*
mkfs-b: Pass the -b (blocksize) parameter to mkfs.

mke2journal and friends: Lets you create external ext2 journals on
devices.

mke2fs-J and friends: Lets you create ext2/3/4 filesystems with
external journals.
2009-08-15 18:05:07 +01:00
Richard W.M. Jones
da54ae6abb generator: Generate the UUIDs for tests randomly.
Adds a uuidgen function which gets the random UUID from the
uuid program.  Uses this for tests.
2009-08-15 18:05:07 +01:00
Jim Meyering
801e7d8418 Merge branch '226-elide' 2009-08-14 22:05:39 +02:00