aboutsummaryrefslogtreecommitdiff
path: root/vboxshfl.h
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2022-04-12 22:38:20 +0200
committerJavier <dev.git@javispedro.com>2022-04-12 22:38:20 +0200
commita109a1193ca3cf64a29265103075922d2dd9fc1b (patch)
treecde59f7e29ccca176dd150a51e8caf4613a86d1f /vboxshfl.h
parent2b9f509a04acb88d9ac72bce23b28099efdc4878 (diff)
downloadvbados-a109a1193ca3cf64a29265103075922d2dd9fc1b.tar.gz
vbados-a109a1193ca3cf64a29265103075922d2dd9fc1b.zip
add file date/time listing support, closeall call
Diffstat (limited to 'vboxshfl.h')
-rw-r--r--vboxshfl.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/vboxshfl.h b/vboxshfl.h
index 292b8a3..aef9bca 100644
--- a/vboxshfl.h
+++ b/vboxshfl.h
@@ -362,6 +362,37 @@ static int32_t vbox_shfl_list(LPVBOXCOMM vb, hgcm_client_id_t client_id, SHFLROO
return req->header.result;
}
+static int32_t vbox_shfl_remove(LPVBOXCOMM vb, hgcm_client_id_t client_id, SHFLROOT root,
+ const SHFLSTRING *path, unsigned flags)
+{
+ VMMDevHGCMCall __far *req = (void __far *) vb->buf;
+ vbox_hgcm_init_call(req, client_id, SHFL_FN_REMOVE, 3);
+
+ // arg 0 in uint32 "root"
+ req->aParms[0].type = VMMDevHGCMParmType_32bit;
+ req->aParms[0].u.value32 = root;
+
+ // arg 1 in shflstring "path"
+ req->aParms[1].type = VMMDevHGCMParmType_LinAddr;
+ req->aParms[1].u.Pointer.size = shflstring_size_with_buf(path);
+ req->aParms[1].u.Pointer.u.linearAddr = linear_addr(path);
+
+ // arg 2 in uint32 "flags"
+ req->aParms[2].type = VMMDevHGCMParmType_32bit;
+ req->aParms[2].u.value32 = flags;
+
+ vbox_send_request(vb->iobase, vb->dds.physicalAddress);
+
+ if (req->header.header.rc < 0) {
+ return req->header.header.rc;
+ } else if (req->header.header.rc == VINF_HGCM_ASYNC_EXECUTE) {
+ vbox_hgcm_wait(&req->header);
+ }
+
+ return req->header.result;
+}
+
+
static int32_t vbox_shfl_set_utf8(LPVBOXCOMM vb, hgcm_client_id_t client_id)
{
VMMDevHGCMCall __far *req = (void __far *) vb->buf;