xref: /reactos/hal/halarm/generic/drive.c (revision c2c66aff)
1 /*
2  * PROJECT:         ReactOS HAL
3  * LICENSE:         BSD - See COPYING.ARM in the top level directory
4  * FILE:            hal/halarm/generic/drive.c
5  * PURPOSE:         HAL Stubs for Disk I/O Routines
6  * PROGRAMMERS:     ReactOS Portable Systems Group
7  */
8 
9 /* INCLUDES ******************************************************************/
10 
11 #include <hal.h>
12 #define NDEBUG
13 #include <debug.h>
14 
15 /* FUNCTIONS *****************************************************************/
16 
17 VOID
18 NTAPI
HalpAssignDriveLetters(IN struct _LOADER_PARAMETER_BLOCK * LoaderBlock,IN PSTRING NtDeviceName,OUT PUCHAR NtSystemPath,OUT PSTRING NtSystemPathString)19 HalpAssignDriveLetters(IN struct _LOADER_PARAMETER_BLOCK *LoaderBlock,
20                        IN PSTRING NtDeviceName,
21                        OUT PUCHAR NtSystemPath,
22                        OUT PSTRING NtSystemPathString)
23 {
24     /* Call the kernel */
25     IoAssignDriveLetters(LoaderBlock,
26                          NtDeviceName,
27                          NtSystemPath,
28                          NtSystemPathString);
29 }
30 
31 NTSTATUS
32 NTAPI
HalpReadPartitionTable(IN PDEVICE_OBJECT DeviceObject,IN ULONG SectorSize,IN BOOLEAN ReturnRecognizedPartitions,IN OUT PDRIVE_LAYOUT_INFORMATION * PartitionBuffer)33 HalpReadPartitionTable(IN PDEVICE_OBJECT DeviceObject,
34                        IN ULONG SectorSize,
35                        IN BOOLEAN ReturnRecognizedPartitions,
36                        IN OUT PDRIVE_LAYOUT_INFORMATION *PartitionBuffer)
37 {
38     /* Call the kernel */
39     return IoReadPartitionTable(DeviceObject,
40                                 SectorSize,
41                                 ReturnRecognizedPartitions,
42                                 PartitionBuffer);
43 }
44 
45 NTSTATUS
46 NTAPI
HalpWritePartitionTable(IN PDEVICE_OBJECT DeviceObject,IN ULONG SectorSize,IN ULONG SectorsPerTrack,IN ULONG NumberOfHeads,IN PDRIVE_LAYOUT_INFORMATION PartitionBuffer)47 HalpWritePartitionTable(IN PDEVICE_OBJECT DeviceObject,
48                         IN ULONG SectorSize,
49                         IN ULONG SectorsPerTrack,
50                         IN ULONG NumberOfHeads,
51                         IN PDRIVE_LAYOUT_INFORMATION PartitionBuffer)
52 {
53     /* Call the kernel */
54     return IoWritePartitionTable(DeviceObject,
55                                  SectorSize,
56                                  SectorsPerTrack,
57                                  NumberOfHeads,
58                                  PartitionBuffer);
59 }
60 
61 NTSTATUS
62 NTAPI
HalpSetPartitionInformation(IN PDEVICE_OBJECT DeviceObject,IN ULONG SectorSize,IN ULONG PartitionNumber,IN ULONG PartitionType)63 HalpSetPartitionInformation(IN PDEVICE_OBJECT DeviceObject,
64                             IN ULONG SectorSize,
65                             IN ULONG PartitionNumber,
66                             IN ULONG PartitionType)
67 {
68     /* Call the kernel */
69     return IoSetPartitionInformation(DeviceObject,
70                                      SectorSize,
71                                      PartitionNumber,
72                                      PartitionType);
73 }
74 
75 /* EOF */
76