From eaffd8105fcd164616aad47cea2b2bf56686acfa Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 19 Jul 2013 14:09:56 +0100 Subject: [PATCH] New API: add-drive-scratch. This adds a temporary scratch drive to the handle. (cherry picked from commit 1b11a83d5248511abbf86775601eb6e25a36c1ee) --- generator/actions.ml | 15 +++++++++++++++ gobject/Makefile.inc | 2 ++ po/POTFILES | 1 + src/drives.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 71 insertions(+) diff --git a/generator/actions.ml b/generator/actions.ml index d30aec8..eb09aa7 100644 --- a/generator/actions.ml +++ b/generator/actions.ml @@ -2954,6 +2954,21 @@ it is set to the empty string (but never C)." }; longdesc = "\ Get the program name. See C." }; + { defaults with + name = "add_drive_scratch"; + style = RErr, [Int64 "size"], [OString "name"; OString "label"]; + blocking = false; + fish_alias = ["scratch"]; + shortdesc = "add a temporary scratch drive"; + longdesc = "\ +This command adds a temporary scratch drive to the handle. The +C parameter is the virtual size (in bytes). The scratch +drive is blank initially (all reads return zeroes until you start +writing to it). The drive is deleted when the handle is closed. + +The optional arguments C and C