From: Richard Jones Date: Tue, 14 Jul 2009 10:48:55 +0000 (+0100) Subject: Improve launch error message. X-Git-Tag: 1.0.59~7 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=9af96c41f64567e6fbe0dd25f6ffa90385e9c49a;p=libguestfs.git Improve launch error message. The previous error message was confusing for new users: libguestfs: error: guestfs_mount: call launch() before using this function The new error message explains the action that the user must take, especially if they are using guestfish: > mount /dev/sda1 / libguestfs: error: guestfs_mount: call launch before using this function (in guestfish, don't forget to use the 'run' command) --- diff --git a/src/generator.ml b/src/generator.ml index e3293d1..d3040d5 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -3737,7 +3737,7 @@ check_state (guestfs_h *g, const char *caller) { if (!guestfs_is_ready (g)) { if (guestfs_is_config (g)) - error (g, \"%%s: call launch() before using this function\", + error (g, \"%%s: call launch before using this function\\n(in guestfish, don't forget to use the 'run' command)\", caller); else if (guestfs_is_launching (g)) error (g, \"%%s: call wait_ready() before using this function\",