ReactOS  0.4.14-dev-317-g96040ec
badblock.h
Go to the documentation of this file.
1 /*++
2 
3 Copyright (C) 2006 VorontSOFT
4 
5 Module Name:
6  badblock.h
7 
8 Abstract:
9  This is the artificial badblock simulation part of the
10  miniport driver for ATA/ATAPI IDE controllers
11  with Busmaster DMA support
12 
13 Author:
14  Nikolai Vorontsov (NickViz)
15 
16 Environment:
17  kernel mode only
18 
19 Notes:
20 
21  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 
32 Revision History:
33  2006/08/03 Initial implementation.
34  2006/08/06 Added registry work.
35 
36 --*/
37 
38 
39 #ifndef _BADBLOCK_H_INCLUDED_
40 #define _BADBLOCK_H_INCLUDED_
41 
42 #pragma pack(push, 4)
43 typedef struct _SBadBlockRange
44 {
45 // ULONG m_ldev;
49 
50 typedef struct _SBadBlockListItem {
57 
58 #pragma pack(pop)
59 
60 void
61 NTAPI
63  IN PHW_LU_EXTENSION LunExt
64  );
65 
66 void
67 NTAPI
69  IN PHW_LU_EXTENSION LunExt
70  );
71 
72 bool
73 NTAPI
75  IN PHW_LU_EXTENSION LunExt,
76 // IN UCHAR command,
78  IN ULONG count
79  );
80 
81 #endif // _BADBLOCK_H_INCLUDED_
void NTAPI ForgetBadBlocks(IN PHW_LU_EXTENSION LunExt)
#define IN
Definition: typedefs.h:38
GLuint GLuint GLsizei count
Definition: gl.h:1545
bool NTAPI CheckIfBadBlock(IN PHW_LU_EXTENSION LunExt, IN ULONGLONG lba, IN ULONG count)
#define lba
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
struct _SBadBlockListItem SBadBlockListItem
WCHAR SerNumStr[128]
Definition: badblock.h:53
struct _SBadBlockRange SBadBlockRange
PHW_LU_EXTENSION LunExt
Definition: badblock.h:52
__wchar_t WCHAR
Definition: xmlstorage.h:180
uint64_t ULONGLONG
Definition: typedefs.h:65
ULONGLONG m_lbaStart
Definition: badblock.h:46
struct _SBadBlockListItem * PSBadBlockListItem
ULONGLONG m_lbaEnd
Definition: badblock.h:47
Definition: typedefs.h:117
struct _SBadBlockRange * PSBadBlockRange
unsigned int ULONG
Definition: retypes.h:1
void NTAPI InitBadBlocks(IN PHW_LU_EXTENSION LunExt)
LIST_ENTRY List
Definition: badblock.h:51
SBadBlockRange * arrBadBlocks
Definition: badblock.h:54