X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=fish%2Ffish.c;h=a57472f8c6eb0c5c856f1a1739fac7750c6b1839;hb=5c3c7e8825341e18c9449976f8a321a04cc78d79;hp=6f2b535ede78cfc34e66a1531b54ab7ca98d31d1;hpb=c8faa5d0b0a17689d27bd33bc787ba0fe9a3f076;p=libguestfs.git diff --git a/fish/fish.c b/fish/fish.c index 6f2b535..a57472f 100644 --- a/fish/fish.c +++ b/fish/fish.c @@ -102,15 +102,6 @@ usage (int status) "Copyright (C) 2009-2011 Red Hat Inc.\n" "Usage:\n" " %s [--options] cmd [: cmd : cmd ...]\n" - " %s [--ro] -i -a disk-image\n" - " %s [--ro] -i -d libvirt-domain\n" - "or for interactive use:\n" - " %s\n" - "or from a shell script:\n" - " %s < /c then C:/foo => /c/foo */ + if (asprintf (&ret, "%s%s%s", + mountpoint, STRNEQ (mountpoint, "/") ? "/" : "", path) == -1) { + perror ("asprintf"); + goto out; + } + + out: + if (roots) + free_strings (roots); + if (drives) + free_strings (drives); + if (mountpoints) + free_strings (mountpoints); + + return ret; +} + /* Resolve the special FileIn paths ("-" or "-<