WindowsXP-SP1/base/fs/ntfs/reparsup.c
2020-09-30 16:53:49 +02:00

92 lines
1.6 KiB
C
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*++
Copyright (c) 1997 Microsoft Corporation
Module Name:
MountSup.c
Abstract:
This module implements the support routines in Ntfs for reparse points.
Author:
Felipe Cabrera [cabrera] 30-Jun-1997
Revision History:
--*/
#include "NtfsProc.h"
#define Dbg DEBUG_TRACE_FSCTRL
//
// Define a tag for general pool allocations from this module
//
#undef MODULE_POOL_TAG
#define MODULE_POOL_TAG ('PFtN')
#ifdef ALLOC_PRAGMA
#pragma alloc_text(PAGE, NtfsInitializeReparsePointIndex)
#endif
VOID
NtfsInitializeReparsePointIndex (
IN PIRP_CONTEXT IrpContext,
IN PFCB Fcb,
IN PVCB Vcb
)
/*++
Routine Description:
This routine opens the mount points index for the volume. If the index does not
exist it is created and initialized.
Arguments:
Fcb - Pointer to Fcb for the object id file.
Vcb - Volume control block for volume being mounted.
Return Value:
None
--*/
{
UNICODE_STRING IndexName = CONSTANT_UNICODE_STRING( L"$R" );
PAGED_CODE();
NtfsAcquireExclusiveFcb( IrpContext, Fcb, NULL, 0 );
try {
NtOfsCreateIndex( IrpContext,
Fcb,
IndexName,
CREATE_OR_OPEN,
0,
COLLATION_NTOFS_ULONGS,
NtOfsCollateUlongs,
NULL,
&Vcb->ReparsePointTableScb );
} finally {
NtfsReleaseFcb( IrpContext, Fcb );
}
}