Red Hat Bugzilla – Bug 592883
can not edit files on images mounted with guestmount cmd
Last modified: 2011-07-14 15:08:47 EDT
Created attachment 414504 [details]
Description of problem:
Can not edit the content of files mounted with guestmount cmd
Version-Release number of selected component (if applicable):
latest git version v1.3.13
Steps to Reproduce:
1. create a blank image with guestfish
2. create several ascii files on it
3. mount the image with guestmount cmd, e.g.:
guestmount -a /home/libguestfs-test/test.img -n -m /dev/sda1 /home/pcao/mnt --trace
4. using vi to create a new file or edit an existing file on "/home/pcao/mnt"
file can not be changed and got read-only error.
file should be changed
cp a file from host to the mount point , and echo sth to a file can not work either.
However, truncate , chmod, ln could work.
I forgot about this, but it's just that we didn't implement the 'write' syscall:
So while in theory this is a simple fix, in fact it's a little more complex than
that because it requires bug 501889 to be fixed first, and that requires some
changes to the generator (see discussion of BufferIn in the TODO file here:
Proposed fixes posted upstream: