Commit Graph

7 Commits

Author SHA1 Message Date
Richard W.M. Jones
116a41d048 daemon: fstrim: Turn "discard operation is not supported" into ENOTSUP.
Because we run the external fstrim command we don't have access to the
kernel errno when it fails.  However in the case where it prints this
specific error message, turn that into errno ENOTSUP.
2016-08-05 15:10:50 +01:00
Richard W.M. Jones
d46ceea601 tests: fstrim: Sync before running fstrim.
This makes fstrim work.  It's not clear why exactly.

Thanks: Paolo Bonzini.
2014-03-14 13:19:42 +00:00
Richard W.M. Jones
5e105e06be daemon: fstrim: Fix fstrim so it trims the correct filesystem.
We didn't call sysroot_path, so it was trimming the appliance instead
of the guest filesystem.
2014-03-12 14:08:22 +00:00
Richard W.M. Jones
46e30c1f7c daemon: fstrim: When debugging, capture and print fstrim -v output. 2014-03-12 14:08:22 +00:00
Richard W.M. Jones
950951c67d daemon: Use the new CLEANUP_* macros to simplify code. 2013-01-28 18:01:43 +00:00
Olaf Hering
0306c98d31 daemon: collect list of called external commands
guestfsd calls many different tools. Keeping track of all of them is
error prone. This patch introduces a new helper macro to put the command
string into its own ELF section:

GUESTFSD_EXT_CMD(C_variable, command_name);

This syntax makes it still possible to grep for used command names.

The actual usage of the collected list could be like this:

  objcopy -j .guestfsd_ext_cmds -O binary daemon/guestfsd /dev/stdout |
  tr '\0' '\n' | sort -u

The resulting output will be used to tell mkinitrd which programs to
copy into the initrd.

Signed-off-by: Olaf Hering <olaf@aepfle.de>

RWMJ:
 - Move str_vgchange at request of author.
 - Fix snprintf call in daemon/debug.c
2012-08-30 20:57:07 +01:00
Richard W.M. Jones
7590924022 New API: fstrim - allow filesystem trim. 2012-06-12 14:33:57 +01:00