use add_drive_ro for --mount parameters from guestfish when called with --ro
authorCharles Duffy <cduffy@messageone.com>
Tue, 2 Jun 2009 16:30:26 +0000 (11:30 -0500)
committerRichard Jones <rjones@trick.home.annexia.org>
Tue, 2 Jun 2009 18:16:34 +0000 (19:16 +0100)
commitd1da506d35e3c14b0bbe5397d73994fe082bc831
tree7cf171da47df4b89f5c18d45751da5a57e4f0ec2
parent76711b7e918f6dc504d3b5e11c6cac5ee11cc34f
use add_drive_ro for --mount parameters from guestfish when called with --ro

To prevent writes (such as ext3 journal replay) from occuring even when --ro is
passed, guestfish should use add_drive_ro() for any drives specified on the
command line with --add if --ro is also passed.

As we need to look through the entire command line for --ro before adding any
drives, we move the add process out of the argument-parsing loop and into its
own function, patterned off mount_mps().

Signed-off-by: Charles Duffy <charles_duffy@dell.com>
fish/fish.c