diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2011-03-30 17:03:11 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2011-03-31 15:42:13 +0100 |
commit | b8e1dee73a1deef1bfd5937e2abfbe9afef7b1ef (patch) | |
tree | 2c523527cf6d52c719722c2400df1bcbf6bd3699 /fuse | |
parent | 4155d20014b24b2203c4dd8b00e2e19450a7e3bb (diff) | |
download | libguestfs-b8e1dee73a1deef1bfd5937e2abfbe9afef7b1ef.tar.gz libguestfs-b8e1dee73a1deef1bfd5937e2abfbe9afef7b1ef.tar.xz libguestfs-b8e1dee73a1deef1bfd5937e2abfbe9afef7b1ef.zip |
Add /etc/libguestfs-tools.conf configuration file.
This allows the default for --ro or --rw to be controlled for the
three tools guestfish, guestmount and virt-rescue.
Diffstat (limited to 'fuse')
-rw-r--r-- | fuse/Makefile.am | 3 | ||||
-rw-r--r-- | fuse/guestmount.c | 2 | ||||
-rw-r--r-- | fuse/guestmount.pod | 19 |
3 files changed, 23 insertions, 1 deletions
diff --git a/fuse/Makefile.am b/fuse/Makefile.am index 1cdb9938..577f51e1 100644 --- a/fuse/Makefile.am +++ b/fuse/Makefile.am @@ -28,6 +28,7 @@ bin_PROGRAMS = guestmount # These source files (all related to option parsing) are shared # between guestfish and guestmount. SHARED_SOURCE_FILES = \ + ../fish/config.c \ ../fish/inspect.c \ ../fish/keys.c \ ../fish/options.h \ @@ -48,10 +49,12 @@ guestmount_CFLAGS = \ -DGUESTFS_DEFAULT_PATH='"$(libdir)/guestfs"' \ -DLOCALEBASEDIR=\""$(datadir)/locale"\" \ $(FUSE_CFLAGS) \ + $(LIBCONFIG_CFLAGS) \ $(WARN_CFLAGS) $(WERROR_CFLAGS) guestmount_LDADD = \ $(FUSE_LIBS) -lulockmgr \ + $(LIBCONFIG_LIBS) \ $(top_builddir)/src/libguestfs.la \ ../gnulib/lib/libgnu.la diff --git a/fuse/guestmount.c b/fuse/guestmount.c index f1f84805..5a89fcbd 100644 --- a/fuse/guestmount.c +++ b/fuse/guestmount.c @@ -947,6 +947,8 @@ main (int argc, char *argv[]) bindtextdomain (PACKAGE, LOCALEBASEDIR); textdomain (PACKAGE); + parse_config (); + enum { HELP_OPTION = CHAR_MAX + 1 }; /* The command line arguments are broadly compatible with (a subset diff --git a/fuse/guestmount.pod b/fuse/guestmount.pod index ea0cb638..9fbefcf3 100644 --- a/fuse/guestmount.pod +++ b/fuse/guestmount.pod @@ -236,7 +236,9 @@ Display the program version and exit. =item B<-w> | B<--rw> -This option does nothing at the moment. +This changes the I<-a>, I<-d> and I<-m> options so that disks are +added and mounts are done read-write. + See L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>. =item B<-x> | B<--trace> @@ -247,6 +249,21 @@ This also stops the daemon from forking into the background. =back +=head1 FILES + +=over 4 + +=item $HOME/.libguestfs-tools.rc + +=item /etc/libguestfs-tools.conf + +This configuration file controls the default read-only or read-write +mode (I<--ro> or I<--rw>). + +See L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>. + +=back + =head1 SEE ALSO L<guestfish(1)>, |