On 11/20/14, 14:09 , "Eric Blake" <eblake@xxxxxxxxxx> wrote: >On 11/17/2014 04:26 PM, Tomoki Sekiyama wrote: >> virDomainGetFSInfo returns a list of filesystems information mounted in >>the >> guest, which contains mountpoints, device names, filesystem types, and >> device aliases named by libvirt. This will be useful, for example, to >> specify mountpoints to fsfreeze when taking snapshot of a part of disks. >> >> Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@xxxxxxx> >> --- >> include/libvirt/libvirt-domain.h | 21 ++++++++++++ >> src/driver-hypervisor.h | 6 +++ >> src/libvirt.c | 66 >>++++++++++++++++++++++++++++++++++++++ >> src/libvirt_public.syms | 6 +++ >> 4 files changed, 99 insertions(+) >> > >> +++ b/include/libvirt/libvirt-domain.h >> @@ -3456,6 +3456,27 @@ int virDomainFSThaw(virDomainPtr dom, >> unsigned int nmountpoints, >> unsigned int flags); >> >> +/** >> + * virDomainFSInfo: >> + * >> + * The data structure containing mounted file systems within a guset >> + * >> + */ >> +typedef struct _virDomainFSInfo virDomainFSInfo; >> +typedef virDomainFSInfo *virDomainFSInfoPtr; >> +struct _virDomainFSInfo { >> + char *mountpoint; /* path to mount point */ >> + char *name; /* device name in the guest (e.g. "sda1") */ >> + char *type; /* filesystem type */ >> + char **devAlias; /* NULL-terminated array of disk device aliases >>*/ >> +}; > >Is it worth also having a size_t ndevAlias that says how long the array >is? It may make client life easier if they have an up-front count. OK, I¹ll add ndevAlias and iterate the devAlias array using that counter. Thanks, Tomoki Sekiyama -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list