summaryrefslogtreecommitdiffstats
path: root/daemon
Commit message (Collapse)AuthorAgeFilesLines
...
* Add optional compress flag to tar-in, tar-out APIs.Richard W.M. Jones2012-08-141-25/+56
| | | | | | | | | | The compress flag can be used to control compression, one of: (none), "compress", "gzip", "bzip2", "xz", "lzop". Thus these calls can now be used instead of tgz-in/tgz-out/txz-in/txz-out, and also support more compression types. Mark these APIs as once_had_no_optargs so that compatibility code is generated.
* xfs: fix a possible memory leakWanlong Gao2012-08-111-0/+1
| | | | | | free out when failure. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
* New APIs: rsync, rsync-in, rsync-outRichard W.M. Jones2012-08-112-0/+152
| | | | Implement rsync.
* grep: Add optargs to grep API and deprecate fgrep etc.Richard W.M. Jones2012-08-021-17/+54
| | | | | | | | This commit makes grep into an optargs API, with flags for extended, fixed, [case-]insensitive and compressed. At the same time it deprecates: egrep, fgrep, grepi, egrepi, fgrepi, zgrep, zegrep, zfgrep, zgrepi, zegrepi and zfgrepi.
* xfs: add new api xfs-growfsWanlong Gao2012-08-021-0/+111
| | | | | | New api xfs_growfs for expanding a XFS filesystem. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
* New API: utsnameRichard W.M. Jones2012-07-302-0/+64
| | | | | | | | | | Typical output: ><fs> utsname uts_sysname: Linux uts_release: 3.5.0-1.fc18.x86_64 uts_version: #1 SMP Mon Jul 23 17:43:39 UTC 2012 uts_machine: x86_64
* New APIs: pvchange-uuid, pvchange-uuid-all, vgchange-uuid, vgchange-uuid-all.Richard W.M. Jones2012-07-251-0/+84
| | | | | | | | These APIs will allow sysprep to change the UUIDs of all PVs and VGs in the system. LVs don't have UUIDs AFAICT, or at least there seems to be no way to change them if they do have them.
* umount: use Dev_or_Path for the argument typeWanlong Gao2012-07-241-3/+0
| | | | | | | | | | | | | | Use Dev_or_Path instead of String. Remove the RESOLVE_DEVICE since Dev_or_Path will generate REQUIRE_ROOT_OR_RESOLVE_DEVICE instead. RWMJ: Note a change in semantics: this now requires root. However this is OK and still works with mkmountpoint and friends because 'is_root_mounted' works even if something is mounted below the root. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
* xfs_info: resolve device when doing xfs_info on a deviceWanlong Gao2012-07-241-13/+8
| | | | | | | Resolve device first, like do_umount. Use Dev_or_Path. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
* umount: add force umount and lazy umountWanlong Gao2012-07-241-5/+26
| | | | | | Add the option force and lazy for force and lazy umount. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
* build: Rename most C files that contain underscore with dash.Richard W.M. Jones2012-07-192-6/+6
| | | | | | | This is just code motion. Some files cannot be renamed. Notably rpcgen input and output files must not contain dash characters, else rpcgen breaks.
* tar-in: Add --no-same-owner flag to tar command when target filesystem ↵Richard W.M. Jones2012-07-181-3/+54
| | | | | | | | | | | | | | | | doesn't support chown (RHBZ#840572). When using tar-in or tools built around it such as virt-make-fs, if the target filesystem is vfat then unpacking the tarball would fail because tar tries to chown(2) files and fails. You would see errors such as: tar: <file>: Cannot change ownership to uid 500, gid 500: Operation not permitted This change detects whether the target filesystem supports chown(2). If not, it adds the --no-same-owner flag to tar to stop it from trying to change the ownership of newly created files.
* daemon: Make 'random_name' into a utility function.Richard W.M. Jones2012-07-183-30/+51
| | | | | This is mostly code motion, although the precise contract of this function changes slightly to make it more generally useful
* New API: add new api xfs_infoWanlong Gao2012-07-182-0/+356
| | | | | | | | | | | | 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.
* augeas: make functions as noreturnWanlong Gao2012-07-181-14/+14
| | | | | | Just make gcc happy. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
* case_sensitive_path: Allow trailing path element to be missing (RHBZ#840115).Richard W.M. Jones2012-07-171-15/+21
| | | | | | | | | | | | case_sensitive_path is undefined when the final path element doesn't exist. Currently it returns an error, but this means that creating a new file doesn't work as expected: $ guestfish --rw -i -d windows touch 'win:c:\blah' libguestfs: error: case_sensitive_path: blah no file or directory found with this name We should allow this case (provided there is no trailing slash) so that new files or directories can be created.
* case_sensitive_path: Move variables to top of function.Richard W.M. Jones2012-07-171-6/+8
| | | | This is just code motion.
* generator: Rename 'ntfsresize_opts' API to 'ntfsresize'.Richard W.M. Jones2012-07-141-11/+5
| | | | | By using the once_had_no_optargs flag, this change is backwards compatible for callers.
* generator: Rename 'mkfs_opts' API to 'mkfs'.Richard W.M. Jones2012-07-141-15/+8
| | | | | By using the once_had_no_optargs flag, this change is backwards compatible for callers.
* daemon: Run fsync on block devices after sync (RHBZ#836710).Richard W.M. Jones2012-07-021-0/+78
| | | | | | | | | | | | | | | | | | On Linux, sync(2) does not actually issue a write barrier, thus it doesn't force a flush of the underlying hardware write cache (or qemu's disk cache in the virtual case). This can be a problem, because libguestfs relies on running sync in the appliance, followed by killing qemu (using SIGTERM). In most cases, this is fine, because killing qemu with SIGTERM should cause it to flush out the disk cache before it exits. However we have found various bugs in qemu which cause qemu to crash while doing the flush, leaving the data unwritten (see RHBZ#836913). The solution is to issue fsync(2) to the block devices. This has a write barrier, so it ensures that qemu writes out its cache long before we get around to killing qemu.
* daemon: Code tidy up in devsparts.Richard W.M. Jones2012-07-021-8/+9
| | | | No functional change.
* New API: guestfs_nr_devicesRichard W.M. Jones2012-06-291-0/+17
| | | | | | This returns the number of whole block devices added. It is usually simpler to call this than to list the devices and count them, which is what we do in some places in the current codebase.
* part-get-bootable: Fix when partitions are missing or unordered (RHBZ#602997).Richard W.M. Jones2012-06-221-4/+16
| | | | | | | | The original fix for this in commit 511c82df46f5c6f4a7f984fdb81d4691038ed6da was not complete, in that it did not fix the case of the old (pre '-m' option) parted. This doesn't matter for Fedora, but it matters for RHEL 5 which has this ancient parted.
* New API: device-index.Richard W.M. Jones2012-06-131-0/+23
| | | | | | This returns the index of the device, eg. /dev/sdb => 1. Or you can think of it as the order that the device was added, or the index of the device in guestfs_list_devices.
* lvm-filter: Make it work with > 26 devices.Richard W.M. Jones2012-06-131-11/+14
| | | | Thanks Alasdair Kergon.
* daemon: Fix order of devices in guestfs_list_devices when > 26 disks.Richard W.M. Jones2012-06-133-2/+69
| | | | | Sort the device names correctly, not just treating them as strings. As a result, /dev/sdz < /dev/sdaa.
* daemon: Always pass -F option to mke2fs.Richard W.M. Jones2012-06-121-6/+6
| | | | | | | | | | Apparently e2fsprogs only knows that "/dev/sda" is a whole device, but doesn't think that "/dev/vda" is. On switching the default device over to virtio-scsi, that causes mke2fs without -F option to complain and ask for an interactive prompt. Adding -F forces it to go ahead anyway. This caused several less-used APIs to break with virtio-scsi.
* New API: fstrim - allow filesystem trim.Richard W.M. Jones2012-06-122-0/+98
|
* btrfs: Modify btrfs availability to test if the kernel supports btrfs.Richard W.M. Jones2012-06-091-1/+1
| | | | | | This is closer to the real meaning of "availability of btrfs", since just having the btrfs tool doesn't help much if it's not supported by the kernel too.
* New API: filesystem-available: tests for filesystem availability.Richard W.M. Jones2012-06-092-0/+82
| | | | | This also creates an internal filesystem_available function within the daemon.
* xattr: Refuse to set or get oversized extended attributes.Richard W.M. Jones2012-05-281-0/+29
| | | | | See: https://www.redhat.com/archives/libguestfs/2012-May/msg00152.html
* fish/mount: Add better error message when -m (mount) fails (RHBZ#824043).Richard W.M. Jones2012-05-241-1/+2
|
* debug: Add setenv debugging command.Richard W.M. Jones2012-05-221-0/+24
|
* NEW API: add new api btrfs-fsckWanlong Gao2012-05-151-0/+44
| | | | | | | | | 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>
* btrfs: change the return value of btrfs-set-seedingWanlong Gao2012-05-151-1/+1
| | | | | | Change the return value from "r" to "0". Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
* doc: Add notes on how GPT works on 4k sector disks.Richard W.M. Jones2012-05-141-1/+3
| | | | | | | | | I used scsi_debug to create a 4k sector virtual disk: modprobe scsi_debug dev_size_mb=128 sector_size=4096 I then used 'gdisk' to create lots of partitions, and used 'hexdump' to examine what was written to disk.
* New API: add new api btrfs-set-seeding to enable or disable seeding.Wanlong Gao2012-05-141-0/+19
| | | | | | | Add the new API btrfs-set-seeding to support the seeding-device feature for btrfs. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
* debug: 'progress' (unsupported debug command) now checks argument is ↵Richard W.M. Jones2012-04-271-1/+5
| | | | | | reasonable (RHBZ#816839). Thanks Yuyu Zhou.
* btrfs-device-delete: Use correct (sysroot-prefixed) path to filesystem.Richard W.M. Jones2012-04-251-1/+3
| | | | This fixes commit 87ea7a04094d5ed40f3f047ff2b7a613d4d530d4.
* New btrfs APIs.Richard W.M. Jones2012-04-251-0/+396
| | | | | | | | | | | | | | | | 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
* btrfs: Modify mkfs-btrfs API so it takes a list of devices.Richard W.M. Jones2012-04-251-7/+16
| | | | | | | btrfs filesystems can span multiple filesystems. Note this changes the API, but this API has not yet been released in a stable version of libguestfs.
* New APIs for reading and writing ext2 file attributes and file generation.Richard W.M. Jones2012-04-131-1/+193
| | | | | | | | | | | | 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.
* New API: mkfs-btrfs for creating btrfs filesystems (RHBZ#807905).Richard W.M. Jones2012-04-022-1/+110
| | | | This allows all parameters from btrfs to be accessed.
* mkfs: Don't allow blocksize to be set on btrfs (RHBZ#807905).Richard W.M. Jones2012-04-021-0/+5
|
* New API: md-stat.Richard W.M. Jones2012-03-201-0/+172
| | | | | This returns information about the underlying devices of an MD (software RAID) device.
* daemon: Add reply_with_error_errno function.Richard W.M. Jones2012-03-202-6/+7
| | | | | | This function allows you to pass an explicit errno back to the library. reply_with_error is redefined as a macro that calls reply_with_error_errno with errno == 0.
* New API: vgmeta: Download volume group metadata.Richard W.M. Jones2012-03-171-0/+88
|
* New APIs: isoinfo and isoinfo-device.Richard W.M. Jones2012-03-162-0/+293
| | | | | Get ISO primary volume descriptor information for either ISO devices or ISO files.
* daemon: Don't call reply_with_* after split_lines fails.Richard W.M. Jones2012-03-162-6/+2
| | | | | split_lines already sets reply_with_*, so calling it again would lose protocol synchronization.
* Use the new lvcreate-free API to create largest possible LVs.Richard W.M. Jones2012-03-151-1/+1
|