Initial original import from: fuse-2.4.2-2.fc4
[captive.git] / src / libcaptive / fs / oplock.c
1 /* $Id$
2  * reactos filesystem oplock functions emulation of libcaptive
3  * Copyright (C) 2002 Jan Kratochvil <project-captive@jankratochvil.net>
4  * 
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; exactly version 2 of June 1991 is required
8  * 
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  * 
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  */
18
19
20 #include "config.h"
21
22 #include "reactos/ddk/fsfuncs.h"        /* self */
23 #include "reactos/ddk/status.h" /* for STATUS_SUCCESS */
24 #include <glib/gmessages.h>
25
26
27 VOID FsRtlInitializeOplock(IN OUT POPLOCK Oplock)
28 {
29         g_return_if_fail(Oplock!=NULL);
30
31         /* FIXME: NOT IMPLEMENTED YET */
32 }
33
34
35 VOID FsRtlUninitializeOplock(IN OUT POPLOCK Oplock)
36 {
37         g_return_if_fail(Oplock!=NULL);
38
39         /* FIXME: NOT IMPLEMENTED YET */
40 }
41
42
43 /**
44  * FsRtlCheckOplock:
45  * @Oplock: ???.
46  * %NULL value is forbidden.
47  * @Irp: ???.
48  * %NULL value is forbidden.
49  * @Context: ???.
50  * %NULL value is permitted.
51  * @CompletionRoutine: ???.
52  * %NULL value is permitted.
53  * @PostIrpRoutine:
54  * %NULL value is permitted.
55  *
56  * libcaptive does not support any oplocks. This function is a NOP.
57  *
58  * Returns: %STATUS_SUCCESS.
59  */
60 NTSTATUS FsRtlCheckOplock(IN POPLOCK Oplock,IN PIRP Irp,IN PVOID Context,
61                 IN POPLOCK_WAIT_COMPLETE_ROUTINE CompletionRoutine OPTIONAL,IN POPLOCK_FS_PREPOST_IRP PostIrpRoutine OPTIONAL)
62 {
63         g_return_val_if_fail(Oplock!=NULL,STATUS_INVALID_PARAMETER);
64         g_return_val_if_fail(Irp!=NULL,STATUS_INVALID_PARAMETER);
65
66         /* NOP */
67
68         return STATUS_SUCCESS;
69 }
70
71
72 BOOLEAN FsRtlCurrentBatchOplock(IN POPLOCK Oplock)
73 {
74         g_return_val_if_fail(Oplock!=NULL,FALSE);
75
76         /* NOP */
77
78         return FALSE; /* no oplock operation pending */
79 }