From 95de8eea73b6fc105de728aad7571cfd0042666f Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Fri, 10 Apr 2009 11:49:51 +0100 Subject: [PATCH] Change Err -> RErr for consistency with other return types. --- src/generator.ml | 78 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/src/generator.ml b/src/generator.ml index 2230ab8..067ac90 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -36,10 +36,10 @@ open Printf type style = ret * args and ret = - (* "Err" as a return value means an int used as a simple error + (* "RErr" as a return value means an int used as a simple error * indication, ie. 0 or -1. *) - | Err + | RErr (* "RInt" as a return value means an int which is -1 for error * or any value >= 0 on success. *) @@ -85,7 +85,7 @@ type flags = *) let non_daemon_functions = [ - ("launch", (Err, []), -1, [FishAlias "run"; FishAction "launch"], + ("launch", (RErr, []), -1, [FishAlias "run"; FishAction "launch"], "launch the qemu subprocess", "\ Internally libguestfs is implemented by running a virtual machine @@ -94,7 +94,7 @@ using L. You should call this after configuring the handle (eg. adding drives) but before performing any actions."); - ("wait_ready", (Err, []), -1, [NotInFish], + ("wait_ready", (RErr, []), -1, [NotInFish], "wait until the qemu subprocess launches", "\ Internally libguestfs is implemented by running a virtual machine @@ -103,12 +103,12 @@ using L. You should call this after C to wait for the launch to complete."); - ("kill_subprocess", (Err, []), -1, [], + ("kill_subprocess", (RErr, []), -1, [], "kill the qemu subprocess", "\ This kills the qemu subprocess. You should never need to call this."); - ("add_drive", (Err, [String "filename"]), -1, [FishAlias "add"], + ("add_drive", (RErr, [String "filename"]), -1, [FishAlias "add"], "add an image to examine or modify", "\ This function adds a virtual machine disk image C to the @@ -124,14 +124,14 @@ image). This is equivalent to the qemu parameter C<-drive file=filename>."); - ("add_cdrom", (Err, [String "filename"]), -1, [FishAlias "cdrom"], + ("add_cdrom", (RErr, [String "filename"]), -1, [FishAlias "cdrom"], "add a CD-ROM disk image to examine", "\ This function adds a virtual CD-ROM disk image to the guest. This is equivalent to the qemu parameter C<-cdrom filename>."); - ("config", (Err, [String "qemuparam"; OptString "qemuvalue"]), -1, [], + ("config", (RErr, [String "qemuparam"; OptString "qemuvalue"]), -1, [], "add qemu parameters", "\ This can be used to add arbitrary qemu command line parameters @@ -143,7 +143,7 @@ The first character of C string must be a C<-> (dash). C can be NULL."); - ("set_path", (Err, [String "path"]), -1, [FishAlias "path"], + ("set_path", (RErr, [String "path"]), -1, [FishAlias "path"], "set the search path", "\ Set the path that libguestfs searches for kernel and initrd.img. @@ -164,7 +164,7 @@ Return the current search path. This is always non-NULL. If it wasn't set already, then this will return the default path."); - ("set_autosync", (Err, [Bool "autosync"]), -1, [FishAlias "autosync"], + ("set_autosync", (RErr, [Bool "autosync"]), -1, [FishAlias "autosync"], "set autosync mode", "\ If C is true, this enables autosync. Libguestfs will make a @@ -176,7 +176,7 @@ best effort attempt to run C when the handle is closed "\ Get the autosync flag."); - ("set_verbose", (Err, [Bool "verbose"]), -1, [FishAlias "verbose"], + ("set_verbose", (RErr, [Bool "verbose"]), -1, [FishAlias "verbose"], "set verbose mode", "\ If C is true, this turns on verbose messages (to C). @@ -191,7 +191,7 @@ This returns the verbose messages flag.") ] let daemon_functions = [ - ("mount", (Err, [String "device"; String "mountpoint"]), 1, [], + ("mount", (RErr, [String "device"; String "mountpoint"]), 1, [], "mount a guest disk at a position in the filesystem", "\ Mount a guest disk at a position in the filesystem. Block devices @@ -211,7 +211,7 @@ on the underlying device. The filesystem options C and C are set with this call, in order to improve reliability."); - ("sync", (Err, []), 2, [], + ("sync", (RErr, []), 2, [], "sync disks, writes are flushed through to the disk image", "\ This syncs the disk, so that any writes are flushed through to the @@ -220,7 +220,7 @@ underlying disk image. You should always call this if you have modified a disk image, before closing the handle."); - ("touch", (Err, [String "path"]), 3, [], + ("touch", (RErr, [String "path"]), 3, [], "update file timestamps or create a new file", "\ Touch acts like the L command. It can be used to @@ -337,7 +337,7 @@ Note that this function cannot correctly handle binary files as end of line). For those you need to use the C function which has a more complex interface."); - ("aug_init", (Err, [String "root"; Int "flags"]), 16, [], + ("aug_init", (RErr, [String "root"; Int "flags"]), 16, [], "create a new Augeas handle", "\ Create a new Augeas handle for editing configuration files. @@ -387,7 +387,7 @@ To close the handle, you can call C. To find out more about Augeas, see L."); - ("aug_close", (Err, []), 26, [], + ("aug_close", (RErr, []), 26, [], "close the current Augeas handle", "\ Close the current Augeas handle and free up any resources @@ -425,12 +425,12 @@ if a node was created."); Look up the value associated with C. If C matches exactly one node, the C is returned."); - ("aug_set", (Err, [String "path"; String "val"]), 20, [], + ("aug_set", (RErr, [String "path"; String "val"]), 20, [], "set Augeas path to value", "\ Set the value associated with C to C."); - ("aug_insert", (Err, [String "path"; String "label"; Bool "before"]), 21, [], + ("aug_insert", (RErr, [String "path"; String "label"; Bool "before"]), 21, [], "insert a sibling Augeas node", "\ Create a new sibling C