X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=daemon%2Fdaemon.h;h=77ee6281a13418e3b9e4d6a85ed301e7d9222727;hp=79f41aed322707d467f2464aea7f63e9d4e20452;hb=463a739bf0475cf45bf03ad2c4130b2ed656686e;hpb=33b638109ed66ea360b53b80b1f407b3a5f5ec39 diff --git a/daemon/daemon.h b/daemon/daemon.h index 79f41ae..77ee628 100644 --- a/daemon/daemon.h +++ b/daemon/daemon.h @@ -1,5 +1,5 @@ /* libguestfs - the guestfsd daemon - * Copyright (C) 2009 Red Hat Inc. + * Copyright (C) 2009-2011 Red Hat Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -36,7 +36,7 @@ extern int verbose; extern int autosync_umount; extern const char *sysroot; -extern int sysroot_len; +extern size_t sysroot_len; extern char *sysroot_path (const char *path); @@ -128,6 +128,9 @@ extern struct optgroup optgroups[]; /* Use this as a replacement for sync(2). */ extern int sync_disks (void); +/*-- in ext2.c --*/ +extern int e2prog (char *name); /* Massive hack for RHEL 5. */ + /*-- in lvm.c --*/ extern int lv_canonical (const char *device, char **ret); @@ -171,6 +174,23 @@ extern void reply (xdrproc_t xdrp, char *ret); */ extern void notify_progress (uint64_t position, uint64_t total); +/* Pulse mode progress messages. + * + * Call pulse_mode_start to start sending progress messages. + * + * Call pulse_mode_end along the ordinary exit path (ie. before a + * reply message is sent). + * + * Call pulse_mode_cancel along all error paths *before* any reply is + * sent. pulse_mode_cancel does not modify errno, so it is safe to + * call it before reply_with_perror. + * + * Pulse mode and ordinary notify_progress must not be mixed. + */ +extern void pulse_mode_start (void); +extern void pulse_mode_end (void); +extern void pulse_mode_cancel (void); + /* Helper for functions that need a root filesystem mounted. * NB. Cannot be used for FileIn functions. */