diff options
author | Karel Zak | 2011-12-02 18:20:34 +0100 |
---|---|---|
committer | Karel Zak | 2011-12-02 18:20:34 +0100 |
commit | d2c97887fee6cdb44378190b04c3dd6d059d3fad (patch) | |
tree | 3ed9b30ac6edb49f4fe771de526b0b7c6fac1ccc /libmount/src/mountP.h | |
parent | libmount: add "+" prefix for options pattern (e.g findmnt -O) (diff) | |
download | kernel-qcow2-util-linux-d2c97887fee6cdb44378190b04c3dd6d059d3fad.tar.gz kernel-qcow2-util-linux-d2c97887fee6cdb44378190b04c3dd6d059d3fad.tar.xz kernel-qcow2-util-linux-d2c97887fee6cdb44378190b04c3dd6d059d3fad.zip |
libmount: add support for mount -a --fork
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/mountP.h')
-rw-r--r-- | libmount/src/mountP.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/libmount/src/mountP.h b/libmount/src/mountP.h index cce4c5c35..9be3aabed 100644 --- a/libmount/src/mountP.h +++ b/libmount/src/mountP.h @@ -61,12 +61,16 @@ # define DBG(m, x) do { \ if ((MNT_DEBUG_ ## m) & libmount_debug_mask) { \ - fprintf(stderr, "libmount: %8s: ", # m); \ + fprintf(stderr, "%d: libmount: %8s: ", getpid(), # m); \ x; \ } \ } while (0) -# define DBG_FLUSH do { fflush(stderr); } while(0) +# define DBG_FLUSH do { \ + if (libmount_debug_mask && \ + libmount_debug_mask != MNT_DEBUG_INIT) \ + fflush(stderr); \ + } while(0) extern int libmount_debug_mask; @@ -299,6 +303,11 @@ struct libmnt_context char *orig_user; /* original (non-fixed) user= option */ + pid_t *children; /* "mount -a --fork" PIDs */ + int nchildren; /* number of children */ + pid_t pid; /* 0=parent; PID=child */ + + int syscall_status; /* 1: not called yet, 0: success, <0: -errno */ }; @@ -313,6 +322,7 @@ struct libmnt_context #define MNT_FL_FORCE (1 << 8) #define MNT_FL_NOCANONICALIZE (1 << 9) #define MNT_FL_RDONLY_UMOUNT (1 << 11) /* remount,ro after EBUSY umount(2) */ +#define MNT_FL_FORK (1 << 12) #define MNT_FL_EXTERN_FS (1 << 15) /* cxt->fs is not private */ #define MNT_FL_EXTERN_FSTAB (1 << 16) /* cxt->fstab is not private */ @@ -370,6 +380,8 @@ extern int mnt_context_setup_loopdev(struct libmnt_context *cxt); extern int mnt_context_delete_loopdev(struct libmnt_context *cxt); extern int mnt_context_clear_loopdev(struct libmnt_context *cxt); +extern int mnt_fork_context(struct libmnt_context *cxt); + /* tab_update.c */ extern struct libmnt_fs *mnt_update_get_fs(struct libmnt_update *upd); extern int mnt_update_set_filename(struct libmnt_update *upd, |