X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=src%2Fgenerator.ml;h=d8abfd63f6bba93f222f2f101a4c44f9d16e02a2;hb=e395d7db8fd3fe3d1b121258fe2f401d6b3e64c8;hp=b3f27cd709362bd29f356a6264c64dd72665b943;hpb=ccc1d216032ff61a81eb1116df44d5bd82079462;p=libguestfs.git diff --git a/src/generator.ml b/src/generator.ml index b3f27cd..d8abfd6 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -3980,11 +3980,18 @@ int main (int argc, char *argv[]) printf (\"guestfs_launch FAILED\\n\"); exit (1); } + + /* Set a timeout in case qemu hangs during launch (RHBZ#505329). */ + alarm (600); + if (guestfs_wait_ready (g) == -1) { printf (\"guestfs_wait_ready FAILED\\n\"); exit (1); } + /* Cancel previous alarm. */ + alarm (0); + nr_tests = %d; " (500 * 1024 * 1024) (50 * 1024 * 1024) (10 * 1024 * 1024) nr_tests; @@ -4796,6 +4803,8 @@ generator (const char *text, int state) len = strlen (text); } + rl_attempted_completion_over = 1; + while ((name = commands[index]) != NULL) { index++; if (strncasecmp (name, text, len) == 0) @@ -4812,8 +4821,12 @@ char **do_completion (const char *text, int start, int end) char **matches = NULL; #ifdef HAVE_LIBREADLINE + rl_completion_append_character = ' '; + if (start == 0) matches = rl_completion_matches (text, generator); + else if (complete_dest_paths) + matches = rl_completion_matches (text, complete_dest_paths_generator); #endif return matches;