mirror of
https://github.com/reactos/reactos.git
synced 2026-06-01 00:40:26 +08:00
[SETUPLIB] Use a "well-known" length for disk volume labels (#7259)
Use the same `MAXIMUM_VOLUME_LABEL_LENGTH` as the one defined in the WDK for specifying the length of buffers storing a volume label.
This commit is contained in:
@@ -108,7 +108,7 @@ MountVolume(
|
||||
struct
|
||||
{
|
||||
FILE_FS_VOLUME_INFORMATION;
|
||||
WCHAR Data[255];
|
||||
WCHAR Data[_countof(Volume->VolumeLabel)];
|
||||
} LabelInfo;
|
||||
|
||||
Status = NtQueryVolumeInformationFile(VolumeHandle,
|
||||
|
||||
@@ -7,13 +7,18 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
/* The maximum volume label length is 32 characters */
|
||||
#ifndef MAXIMUM_VOLUME_LABEL_LENGTH // Defined in wdm.h only
|
||||
#define MAXIMUM_VOLUME_LABEL_LENGTH (32 * sizeof(WCHAR))
|
||||
#endif
|
||||
|
||||
typedef struct _VOLINFO
|
||||
{
|
||||
// WCHAR VolumeName[MAX_PATH]; ///< Name in the DOS/Win32 namespace: "\??\Volume{GUID}\"
|
||||
WCHAR DeviceName[MAX_PATH]; ///< NT device name: "\Device\HarddiskVolumeN"
|
||||
|
||||
WCHAR DriveLetter;
|
||||
WCHAR VolumeLabel[20];
|
||||
WCHAR VolumeLabel[MAXIMUM_VOLUME_LABEL_LENGTH / sizeof(WCHAR) + 1]; ///< Volume label, NUL-terminated
|
||||
WCHAR FileSystem[MAX_PATH+1];
|
||||
|
||||
// VOLUME_TYPE VolumeType;
|
||||
|
||||
Reference in New Issue
Block a user