Commit Graph

38 Commits

Author SHA1 Message Date
Wanlong Gao
87206e4e9e New API: add new api xfs_info
Add xfs_info to show the geometry of the xfs filesystem.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>

RWMJ:
 - Updated po/POTFILES.
 - Use xfs_ prefix for all struct fields.
 - Return uninitialized fields as -1 / empty string.
 - Copyedit the description.
2012-07-18 09:37:17 +01:00
Richard W.M. Jones
95d26f0240 generator: Rename 'ntfsresize_opts' API to 'ntfsresize'.
By using the once_had_no_optargs flag, this change is backwards
compatible for callers.
2012-07-14 13:08:21 +01:00
Richard W.M. Jones
e055bf4cab generator: Rename 'mkfs_opts' API to 'mkfs'.
By using the once_had_no_optargs flag, this change is backwards
compatible for callers.
2012-07-14 12:43:13 +01:00
Richard W.M. Jones
7486fc6f43 generator: Rename 'add_drive_opts' API to 'add_drive'.
By using the once_had_no_optargs flag, this change is backwards
compatible for callers (except Haskell, PHP and GObject as discussed
in earlier commit).
2012-07-14 12:42:24 +01:00
Richard W.M. Jones
e452a0b8ca tests: Rename test0* functions as internal_test*.
The internal_* prefix is reserved for internal functions
such as these tests.
2012-07-11 23:56:10 +01:00
Richard W.M. Jones
1b56aedc2b gobject: Use run --test for tests, and set GJS in run script. 2012-06-28 13:35:55 +01:00
Richard W.M. Jones
6afb7336e3 gobject: bindtests: gjs exception behaviour changed, fix test.
When libguestfs calls 'error (g, "error")', gjs in F17 throws
error.message == "Error invoking Guestfs.test0rinterr: error"

In F18, error.message is simply the string "error".

Fix the test so it works for both cases.
2012-06-27 10:55:59 +01:00
Richard W.M. Jones
bc7f1a5ef1 build: Define abs_builddir if not defined already.
This is missing on RHEL 5.

This updates commit 50aa9533e4.
2012-06-18 21:45:13 +01:00
Richard W.M. Jones
50aa9533e4 build: Define builddir and abs_srcdir when they are missing.
RHEL 5-era autoconf did not define these, so define them manually
when they are missing.

Define builddir as '.'  The scripts require this.  It won't work
in the srcdir != builddir case, but we don't care about that for
RHEL 5.

This commit also moves the builddir / abs_srcdir variable setting
above the include of subdir-rules.mk, in case that include uses
these variables.

Useful script:

  for f in $(find -name Makefile.am | xargs fgrep '$(abs_srcdir)' -l) ; do
    if ! grep -q '^abs_srcdir' $f; then
      echo missing in $f
    fi
  done
2012-06-18 15:32:47 +01:00
Richard W.M. Jones
7590924022 New API: fstrim - allow filesystem trim. 2012-06-12 14:33:57 +01:00
Hilko Bengen
3893dc0b94 Split off GObject tests that require an appliance 2012-05-28 20:01:47 +02:00
Hilko Bengen
148e806826 Fix out-of-tree build for GObject bindings 2012-05-28 20:01:47 +02:00
Wanlong Gao
b9331a2d73 NEW API: add new api btrfs-fsck
Add the new API btrfs-fsck to check the btrfs filesystem.
Btrfs is currently under heavy development, and not suitable for
any uses other than benchmarking and review. But it'll be useful
in the near future.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
2012-05-15 16:07:45 +01:00
Wanlong Gao
e9f6ce2492 gobject: remove old generated files further
also remove guestfs-gobject.c

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
2012-05-15 09:13:12 +01:00
Richard W.M. Jones
7fffaf204e gobject: Remove old generated files. 2012-05-15 08:38:46 +01:00
Richard W.M. Jones
d448ae0c2b gobject: Fix installation of headers.
RPM build errors:
error: Installed (but unpackaged) file(s) found:
   /usr/include/optargs-add_domain.h
   /usr/include/optargs-add_drive_opts.h
   /usr/include/optargs-btrfs_filesystem_resize.h
   /usr/include/optargs-compress_device_out.h
   /usr/include/optargs-compress_out.h
   /usr/include/optargs-copy_device_to_device.h
   /usr/include/optargs-copy_device_to_file.h
   /usr/include/optargs-copy_file_to_device.h
   /usr/include/optargs-copy_file_to_file.h
   /usr/include/optargs-e2fsck.h
   /usr/include/optargs-inspect_get_icon.h
   /usr/include/optargs-md_create.h
   /usr/include/optargs-mkfs_btrfs.h
   /usr/include/optargs-mkfs_opts.h
   /usr/include/optargs-mount_9p.h
   /usr/include/optargs-mount_local.h
   /usr/include/optargs-ntfsclone_out.h
   /usr/include/optargs-ntfsfix.h
   /usr/include/optargs-ntfsresize_opts.h
   /usr/include/optargs-set_e2attrs.h
   /usr/include/optargs-test0.h
   /usr/include/optargs-tune2fs.h
   /usr/include/optargs-umount_local.h
   /usr/include/session.h
   /usr/include/struct-application.h
   /usr/include/struct-btrfssubvolume.h
   /usr/include/struct-dirent.h
   /usr/include/struct-inotify_event.h
   /usr/include/struct-int_bool.h
   /usr/include/struct-isoinfo.h
   /usr/include/struct-lvm_lv.h
   /usr/include/struct-lvm_pv.h
   /usr/include/struct-lvm_vg.h
   /usr/include/struct-mdstat.h
   /usr/include/struct-partition.h
   /usr/include/struct-stat.h
   /usr/include/struct-statvfs.h
   /usr/include/struct-version.h
   /usr/include/struct-xattr.h
   /usr/include/tristate.h

We want to put these headers into the subdirectory, but not
guestfs-gobject.h.  This isn't easy with automake.
2012-04-27 09:11:33 +01:00
Richard W.M. Jones
1f0964536b gobject: Fix whitespace in Makefile.am. 2012-04-27 09:10:33 +01:00
Richard W.M. Jones
eafefab937 gobject: Use generator_built macro to ensure generated files are rebuilt properly. 2012-04-26 15:52:59 +01:00
Matthew Booth
d58cb029a3 gobject: Move headers into a subdirectory
The gobject bindings generate a large number of header files, which pollute
/usr/include when installed. This patch moves them all into a guestfs-gobject/
subdirectory. guestfs-gobject.h remains in the same place.

This change also moves generated source files into src/, because it makes the
gobject directory a bit tidier.
2012-04-26 14:02:26 +01:00
Matthew Booth
8fb67ee66a gobject: Implement libguestfs events as signals
Implement libguestfs events as GObject signals. Callback arguments are passed in
a boxed object.

Note that this patch fixes the length of the uint64_t array in the callback
arguments at 16, whereas it is actually arbitrary length. This is to make it
introspectable. There is currently no way to pass an arbitrary length array to a
callback, and have its type introspected.
2012-04-26 13:35:34 +01:00
Richard W.M. Jones
87ea7a0409 New btrfs APIs.
Bind the easy parts of the 'btrfs' program.

The new APIs are:

btrfs-device-add: add devices to a btrfs filesystem
btrfs-device-delete: remove devices from a btrfs filesystem
btrfs-filesystem-sync: sync a btrfs filesystem
btrfs-filesystem-balance: balance a btrfs filesystem
btrfs-subvolume-create: create a btrfs snapshot
btrfs-subvolume-delete: delete a btrfs snapshot
btrfs-subvolume-list: list btrfs snapshots and subvolumes
btrfs-subvolume-set-default: set default btrfs subvolume
btrfs-subvolume-snapshot: create a writable btrfs snapshot
2012-04-25 17:32:30 +01:00
Richard W.M. Jones
8104b2dfab New APIs for reading and writing ext2 file attributes and file generation.
The new APIs are:

  get-e2attrs: List ext2 file attributes of a file.
  set-e2attrs: Set or clear ext2 file attributes of a file.
  get-e2generation: Get ext2 file generation of a file.
  set-e2generation: Set ext2 file generation of a file.

These are implemented using the lsattr and chattr programs from
e2fsprogs.
2012-04-13 15:44:17 +01:00
Richard W.M. Jones
50009403b3 New API: mkfs-btrfs for creating btrfs filesystems (RHBZ#807905).
This allows all parameters from btrfs to be accessed.
2012-04-02 10:12:38 +01:00
Richard W.M. Jones
c6f09fac06 New APIs: mount-local, mount-local-run, umount-local (FUSE support in the API).
Add FUSE support directly to the API.  Instead of needing to use the
external 'guestmount' command, you can mount the libguestfs filesystem
space on a local mountpoint using an API call from any language.

Note that although mount-local-run is marked as Cancellable, the
current implementation does not support it, but it would be relatively
simple to add it.
2012-03-29 16:45:01 +01:00
Matthew Booth
49fdba0ae9 gobject: Ignore generated guestfs-sections.txt 2012-03-29 13:42:02 +01:00
Hilko Bengen
0c9361a356 Fix out-of-tree build for GObject bindings
guestfs-gobject.h (in the source directory) was not found.

In file included from <stdin>:4:0:
/path/to/libguestfs/gobject/guestfs-gobject.h:23:37: fatal error: guestfs-gobject-session.h: No such file or directory
compilation terminated.
Error while processing the source.
make[2]: *** [Guestfs-1.0.gir] Error 1
2012-03-28 23:30:59 +02:00
Matthew Booth
2b9167540f gobject: Remove gtk-doc from TODO 2012-03-28 20:05:41 +01:00
Matthew Booth
3b0cb4dfdc gobject: Split sources into 1 file per class
This greatly improves the usability of the generated gtk-doc.

Although there is a lot of churn in generator_gobject.ml, this is almost
exclusively code motion.
2012-03-28 20:04:21 +01:00
Matthew Booth
b0ebf37a94 gobject: Add infrastructure to build gtk-doc 2012-03-28 20:04:20 +01:00
Matthew Booth
3bf5d0d0e4 gobject: Update TODO with details of inspect_get_type fix 2012-03-06 14:48:41 +00:00
Richard W.M. Jones
93e443ccad build: Add gobject/TODO.txt to EXTRA_DIST.
This updates commit dd25638fc1.
2012-01-26 17:05:25 +00:00
Matthew Booth
dd25638fc1 gobject: Add a TODO list 2012-01-26 11:55:43 +00:00
Matthew Booth
8bad4d1c47 gobject: Add an explicit close call
This change binds guestfs_close(). It consequently results in RConstOptString
being able to throw an error.
2012-01-26 11:49:12 +00:00
Hilko Bengen
3a754cc88f gobject: Run bindtests from srcdir. 2012-01-23 09:59:16 +00:00
Richard W.M. Jones
17a599ef27 gobject: Include bindtests-manual.js in EXTRA_DIST.
This fixes commit 93b0769ec7.
2012-01-22 11:34:04 +00:00
Matthew Booth
93b0769ec7 gobject: Add bindtests for return values 2012-01-20 18:43:51 +00:00
Matthew Booth
e99a6a8483 gobject: Add basic bindtests 2012-01-20 18:42:40 +00:00
Matthew Booth
5c5babb40b gobject: Add GObject bindings 2012-01-20 18:12:38 +00:00