[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] minor usability issue: confusing error message with guestmount + fuse errors



Hello,

Using older libguestfs 1.34.6-2 (from Ubuntu's standard package),
I encountered this:

libguestfs fails with an error, but the error code is "success":

  $ sudo guestmount -m /dev/sda1 --ro \
                    -o allow_others \
                    -a data.qcow2 \
                    /media/foo
  fuse: unknown option `allow_others'
  libguestfs: error: fuse_new: /media/foo/: Success


Other fuse errors also cause the same behavior,
e.g. mounting to an already-mounted directory:

  $ sudo guestmount -m /dev/sda1 --ro -a data2.qcow2 /media/foo
  /media/foo mountpoint is not empty
  fuse: mountpoint is not empty
  fuse: if you are sure this is safe, use the 'nonempty' mount option
  libguestfs: error: fuse_mount: /media/foo: Success


I guess libguestfs uses the most recent 'errno'
to report the error string, but it is zero
(because the error was somewhere deeper, in fuse).


regards,
 - assaf


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]