git://git.jankratochvil.net
/
captive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Initial original import from: fuse-2.4.2-2.fc4
[captive.git]
/
src
/
libcaptive
/
ob
/
handle.c
diff --git
a/src/libcaptive/ob/handle.c
b/src/libcaptive/ob/handle.c
index
cfb74c1
..
3dc7db0
100644
(file)
--- a/
src/libcaptive/ob/handle.c
+++ b/
src/libcaptive/ob/handle.c
@@
-1,5
+1,5
@@
/* $Id$
/* $Id$
- * reactos
overall object handling support
for reactos of libcaptive
+ * reactos
support for object handle handling
for reactos of libcaptive
* Copyright (C) 2002 Jan Kratochvil <project-captive@jankratochvil.net>
*
* This program is free software; you can redistribute it and/or modify
* Copyright (C) 2002 Jan Kratochvil <project-captive@jankratochvil.net>
*
* This program is free software; you can redistribute it and/or modify
@@
-19,15
+19,20
@@
#include "config.h"
#include "config.h"
-#include "reactos/
ddk/zw.h"
/* self */
+#include "reactos/
ntos/zw.h"
/* self */
#include "reactos/ntos/types.h" /* for HANDLE */
#include "reactos/napi/types.h" /* for NTSTATUS */
#include <glib/gmessages.h>
#include "reactos/ntos/types.h" /* for HANDLE */
#include "reactos/napi/types.h" /* for NTSTATUS */
#include <glib/gmessages.h>
+/* libcaptive/ps/create.c: */
+extern const guint8 PsCreateSystemThread_bogusthread;
+
+
/**
* ZwClose:
* @Handle: Handle from some Zw*() create function.
/**
* ZwClose:
* @Handle: Handle from some Zw*() create function.
+ * %NULL value is forbidden.
*
* Direct pass to NtClose(). reactos aliases this call to NtClose()
* in its "reactos/iface/native/sysfuncs.lst" file.
*
* Direct pass to NtClose(). reactos aliases this call to NtClose()
* in its "reactos/iface/native/sysfuncs.lst" file.
@@
-38,5
+43,11
@@
NTSTATUS ZwClose(HANDLE Handle)
{
g_return_val_if_fail(Handle!=NULL,STATUS_INVALID_HANDLE);
{
g_return_val_if_fail(Handle!=NULL,STATUS_INVALID_HANDLE);
+ /* FIXME: libcaptive does not yet create the threads (thread objects)
+ * but ntfs.sys will ZwClose() immediately after its PsCreateSystemThread().
+ */
+ if (Handle==(HANDLE)&PsCreateSystemThread_bogusthread)
+ return STATUS_SUCCESS;
+
return NtClose(Handle);
}
return NtClose(Handle);
}