Skip to content

Commit

Permalink
** wip volume
Browse files Browse the repository at this point in the history
  • Loading branch information
HBelusca committed Nov 9, 2024
1 parent 6528b66 commit 0216114
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion base/setup/lib/utils/volutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ MountVolume(
struct
{
FILE_FS_VOLUME_INFORMATION;
WCHAR Data[255];
WCHAR Data[_countof(Volume->VolumeLabel)];
} LabelInfo;

Status = NtQueryVolumeInformationFile(VolumeHandle,
Expand Down
7 changes: 6 additions & 1 deletion base/setup/lib/utils/volutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0216114

Please sign in to comment.