Split MUP into two parts; MUP on one side, DFS on the second side.
This will allow using headers in other parts

svn path=/trunk/; revision=74544
This commit is contained in:
Pierre Schweitzer 2017-05-14 10:15:43 +00:00
parent 5e9d1bc628
commit 4875f5476e
5 changed files with 158 additions and 69 deletions

View file

@ -1,6 +1,8 @@
list(APPEND SOURCE
dfs.c
mup.c
dfs.h
mup.h)
add_library(mup SHARED ${SOURCE} mup.rc)

View file

@ -0,0 +1,96 @@
/*
* ReactOS kernel
* Copyright (C) 2002 ReactOS Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: drivers/filesystems/mup/dfs.c
* PURPOSE: Multi UNC Provider
* PROGRAMMER: Pierre Schweitzer (pierre@reactos.org)
*/
/* INCLUDES *****************************************************************/
#include "mup.h"
#define NDEBUG
#include <debug.h>
#if defined(ALLOC_PRAGMA)
#pragma alloc_text(INIT, DfsDriverEntry)
#endif
/* FUNCTIONS ****************************************************************/
NTSTATUS
NTAPI
DfsVolumePassThrough(PDEVICE_OBJECT DeviceObject,
PIRP Irp)
{
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS
DfsFsdFileSystemControl(PDEVICE_OBJECT DeviceObject,
PIRP Irp)
{
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS
DfsFsdCreate(PDEVICE_OBJECT DeviceObject,
PIRP Irp)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS
DfsFsdCleanup(PDEVICE_OBJECT DeviceObject,
PIRP Irp)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS
DfsFsdClose(PDEVICE_OBJECT DeviceObject,
PIRP Irp)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
VOID
DfsUnload(PDRIVER_OBJECT DriverObject)
{
UNIMPLEMENTED;
}
INIT_SECTION
NTSTATUS
DfsDriverEntry(PDRIVER_OBJECT DriverObject,
PUNICODE_STRING RegistryPath)
{
/* We don't support DFS yet, so
* fail to make sure it remains disabled
*/
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}

View file

@ -0,0 +1,58 @@
#ifndef _DFS_PCH_
#define _DFS_PCH_
#define DFS_OPEN_CONTEXT 0xFF444653
#define DFS_DOWNLEVEL_OPEN_CONTEXT 0x11444653
#define DFS_CSCAGENT_NAME_CONTEXT 0xAAAAAAAA
#define DFS_USER_NAME_CONTEXT 0xBBBBBBBB
typedef struct _DFS_NAME_CONTEXT_
{
UNICODE_STRING UNCFileName;
LONG NameContextType;
ULONG Flags;
} DFS_NAME_CONTEXT, *PDFS_NAME_CONTEXT;
NTSTATUS
NTAPI
DfsVolumePassThrough(
PDEVICE_OBJECT DeviceObject,
PIRP Irp
);
NTSTATUS
DfsFsdFileSystemControl(
PDEVICE_OBJECT DeviceObject,
PIRP Irp
);
NTSTATUS
DfsFsdCreate(
PDEVICE_OBJECT DeviceObject,
PIRP Irp
);
NTSTATUS
DfsFsdCleanup(
PDEVICE_OBJECT DeviceObject,
PIRP Irp
);
NTSTATUS
DfsFsdClose(
PDEVICE_OBJECT DeviceObject,
PIRP Irp
);
VOID
DfsUnload(
PDRIVER_OBJECT DriverObject
);
NTSTATUS
DfsDriverEntry(
PDRIVER_OBJECT DriverObject,
PUNICODE_STRING RegistryPath
);
#endif

View file

@ -39,12 +39,6 @@ DriverEntry(
PUNICODE_STRING RegistryPath
);
NTSTATUS
DfsDriverEntry(
PDRIVER_OBJECT DriverObject,
PUNICODE_STRING RegistryPath
);
VOID
MupInitializeData(
VOID
@ -57,7 +51,6 @@ MupInitializeVcb(
#if defined(ALLOC_PRAGMA)
#pragma alloc_text(INIT, DriverEntry)
#pragma alloc_text(INIT, DfsDriverEntry)
#pragma alloc_text(INIT, MupInitializeData)
#pragma alloc_text(INIT, MupInitializeVcb)
#endif
@ -786,14 +779,6 @@ Cleanup:
return Status;
}
NTSTATUS
NTAPI
DfsVolumePassThrough(PDEVICE_OBJECT DeviceObject,
PIRP Irp)
{
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS
NTAPI
MupForwardIoRequest(PDEVICE_OBJECT DeviceObject,
@ -1275,13 +1260,6 @@ RegisterUncProvider(PDEVICE_OBJECT DeviceObject,
return Status;
}
NTSTATUS
DfsFsdFileSystemControl(PDEVICE_OBJECT DeviceObject,
PIRP Irp)
{
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS
NTAPI
MupFsControl(PDEVICE_OBJECT DeviceObject,
@ -1912,14 +1890,6 @@ Cleanup:
return STATUS_MORE_PROCESSING_REQUIRED;
}
NTSTATUS
DfsFsdCreate(PDEVICE_OBJECT DeviceObject,
PIRP Irp)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS
CreateRedirectedFile(PIRP Irp,
PFILE_OBJECT FileObject,
@ -2322,14 +2292,6 @@ MupCloseUncProvider(PMUP_UNC UncProvider)
}
}
NTSTATUS
DfsFsdCleanup(PDEVICE_OBJECT DeviceObject,
PIRP Irp)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS
NTAPI
MupCleanup(PDEVICE_OBJECT DeviceObject,
@ -2453,14 +2415,6 @@ MupCloseFcb(PDEVICE_OBJECT DeviceObject,
return STATUS_SUCCESS;
}
NTSTATUS
DfsFsdClose(PDEVICE_OBJECT DeviceObject,
PIRP Irp)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS
NTAPI
MupClose(PDEVICE_OBJECT DeviceObject,
@ -2532,12 +2486,6 @@ MupClose(PDEVICE_OBJECT DeviceObject,
return Status;
}
VOID
DfsUnload(PDRIVER_OBJECT DriverObject)
{
UNIMPLEMENTED;
}
VOID
NTAPI
MupUnload(PDRIVER_OBJECT DriverObject)
@ -2552,18 +2500,6 @@ MupUnload(PDRIVER_OBJECT DriverObject)
MupUninitializeData();
}
INIT_SECTION
NTSTATUS
DfsDriverEntry(PDRIVER_OBJECT DriverObject,
PUNICODE_STRING RegistryPath)
{
/* We don't support DFS yet, so
* fail to make sure it remains disabled
*/
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
/*
* FUNCTION: Called by the system to initialize the driver
* ARGUMENTS:

View file

@ -19,11 +19,6 @@
#define FILE_SIMPLE_RIGHTS_MASK (FILE_ALL_ACCESS & ~STANDARD_RIGHTS_REQUIRED &~ SYNCHRONIZE)
#define DFS_OPEN_CONTEXT 0xFF444653
#define DFS_DOWNLEVEL_OPEN_CONTEXT 0x11444653
#define DFS_CSCAGENT_NAME_CONTEXT 0xAAAAAAAA
#define DFS_USER_NAME_CONTEXT 0xBBBBBBBB
#define NODE_TYPE_VCB 0x1
#define NODE_TYPE_UNC 0x2
#define NODE_TYPE_PFX 0x3
@ -146,4 +141,6 @@ typedef struct _QUERY_PATH_CONTEXT
PIRP Irp;
} QUERY_PATH_CONTEXT, *PQUERY_PATH_CONTEXT;
#include "dfs.h"
#endif /* _MUP_PCH_ */