ReactOS 0.4.16-dev-252-g9ccafe8
volutil.h
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Setup Library
3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * PURPOSE: Volume utility functions
5 * COPYRIGHT: Copyright 2024 Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
6 */
7
8#pragma once
9
10typedef struct _VOLINFO
11{
12 // WCHAR VolumeName[MAX_PATH]; ///< Name in the DOS/Win32 namespace: "\??\Volume{GUID}\"
14
18
19 // VOLUME_TYPE VolumeType;
20 // ULARGE_INTEGER Size;
21 // PVOLUME_DISK_EXTENTS Extents;
23
24/* RawFS "RAW" file system name */
25#define IS_RAWFS(fs) \
26 ((fs)[0] == 'R' && (fs)[1] == 'A' && (fs)[2] == 'W' && (fs)[3] == 0)
27
28#define IsUnknown(VolInfo) \
29 (!*(VolInfo)->FileSystem)
30
31#define IsUnformatted(VolInfo) \
32 IS_RAWFS((VolInfo)->FileSystem)
33
34#define IsFormatted(VolInfo) \
35 (!IsUnknown(VolInfo) && !IsUnformatted(VolInfo))
36
37
41 _In_opt_ UCHAR MbrPartitionType);
42
47
48/* EOF */
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
_Inout_ PVCB _In_ BOOLEAN Force
Definition: cdprocs.h:1417
#define MAX_PATH
Definition: compat.h:34
UNICODE_STRING Volume
Definition: fltkernel.h:1172
#define _Inout_
Definition: no_sal2.h:162
#define _In_
Definition: no_sal2.h:158
#define _In_opt_
Definition: no_sal2.h:212
WCHAR VolumeLabel[20]
Definition: volutil.h:16
WCHAR FileSystem[MAX_PATH+1]
Definition: volutil.h:17
WCHAR DriveLetter
Definition: volutil.h:15
struct _VOLINFO VOLINFO
struct _VOLINFO * PVOLINFO
NTSTATUS DismountVolume(_Inout_ PVOLINFO Volume, _In_ BOOLEAN Force)
Attempts to dismount the designated volume.
Definition: volutil.c:152
NTSTATUS MountVolume(_Inout_ PVOLINFO Volume, _In_opt_ UCHAR MbrPartitionType)
Definition: volutil.c:23
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
Definition: wdfdevice.h:3275
unsigned char UCHAR
Definition: xmlstorage.h:181
__wchar_t WCHAR
Definition: xmlstorage.h:180