From: Richard Jones Date: Thu, 13 Aug 2009 13:39:31 +0000 (+0100) Subject: cp/cp-a/mv parameters marked as Pathname. X-Git-Tag: 1.0.67~10 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=80c479162db74c461d671128237975aecc982a5e;p=libguestfs.git cp/cp-a/mv parameters marked as Pathname. --- diff --git a/daemon/cpmv.c b/daemon/cpmv.c index 1007203..47b8aa2 100644 --- a/daemon/cpmv.c +++ b/daemon/cpmv.c @@ -52,10 +52,6 @@ cpmv_cmd (const char *cmd, const char *flags, const char *src, const char *dest) char *err; int r; - NEED_ROOT (return -1); - ABS_PATH (src, return -1); - ABS_PATH (dest, return -1); - srcbuf = sysroot_path (src); if (srcbuf == NULL) { reply_with_perror ("malloc"); diff --git a/src/generator.ml b/src/generator.ml index b4dd4cd..1278afd 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -2170,7 +2170,7 @@ See also: C."); This command installs GRUB (the Grand Unified Bootloader) on C, with the root directory being C."); - ("cp", (RErr, [String "src"; String "dest"]), 87, [], + ("cp", (RErr, [Pathname "src"; Pathname "dest"]), 87, [], [InitBasicFS, Always, TestOutput ( [["write_file"; "/old"; "file content"; "0"]; ["cp"; "/old"; "/new"]; @@ -2189,7 +2189,7 @@ C, with the root directory being C."); This copies a file from C to C where C is either a destination filename or destination directory."); - ("cp_a", (RErr, [String "src"; String "dest"]), 88, [], + ("cp_a", (RErr, [Pathname "src"; Pathname "dest"]), 88, [], [InitBasicFS, Always, TestOutput ( [["mkdir"; "/olddir"]; ["mkdir"; "/newdir"]; @@ -2201,7 +2201,7 @@ either a destination filename or destination directory."); This copies a file or directory from C to C recursively using the C command."); - ("mv", (RErr, [String "src"; String "dest"]), 89, [], + ("mv", (RErr, [Pathname "src"; Pathname "dest"]), 89, [], [InitBasicFS, Always, TestOutput ( [["write_file"; "/old"; "file content"; "0"]; ["mv"; "/old"; "/new"];