Skip to content

Commit

Permalink
**** Possible FIXMEs / TODOs for the future
Browse files Browse the repository at this point in the history
  • Loading branch information
HBelusca committed Oct 24, 2024
1 parent c7dfe28 commit e6a7608
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions base/setup/lib/fsutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,8 @@ FormatVolume(
return Status;

/* Set the new volume's file system and label */
// TODO: Here, call a volutil.c function that updates
// the actual FS name and the label fields of the volume.
RtlStringCbCopyW(Volume->FileSystem, sizeof(Volume->FileSystem), FileSystemName);
if (!Label) Label = L"";
RtlStringCbCopyW(Volume->VolumeLabel, sizeof(Volume->VolumeLabel), Label);
Expand Down
2 changes: 1 addition & 1 deletion base/setup/lib/setuplib.c
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@ NTSTATUS
InitDestinationPaths(
_Inout_ PUSETUP_DATA pSetupData,
_In_ PCWSTR InstallationDir,
_In_ PVOLENTRY Volume)
_In_ PVOLENTRY Volume) // FIXME: HACK!
{
NTSTATUS Status;
PPARTENTRY PartEntry = Volume->PartEntry;
Expand Down
2 changes: 1 addition & 1 deletion base/setup/lib/setuplib.h
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ NTSTATUS
InitDestinationPaths(
_Inout_ PUSETUP_DATA pSetupData,
_In_ PCWSTR InstallationDir,
_In_ PVOLENTRY Volume);
_In_ PVOLENTRY Volume); // FIXME: HACK!

// NTSTATUS
ERROR_NUMBER
Expand Down
3 changes: 3 additions & 0 deletions base/setup/lib/utils/filesup.c
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,9 @@ DoesPathExist_UStr(
RootDirectory,
NULL);

// Investigate: check for presence of FILE_ATTRIBUTE_DIRECTORY
// or FILE_ATTRIBUTE_REPARSE_POINT for directories?

Status = NtOpenFile(&FileHandle,
IsDirectory ? (FILE_LIST_DIRECTORY | SYNCHRONIZE)
: FILE_GENERIC_READ, // Contains SYNCHRONIZE
Expand Down
4 changes: 4 additions & 0 deletions base/setup/lib/utils/partlist.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ typedef struct _VOLENTRY
VOLINFO Info;
FORMATSTATE FormatState;

/** The following properties may be replaced by flags **/

/* Volume must be checked */
BOOLEAN NeedsCheck;
/* Volume is new and has not yet been actually formatted and mounted */
Expand Down Expand Up @@ -76,6 +78,8 @@ typedef struct _PARTENTRY
ULONG PartitionIndex; /* Index in the LayoutBuffer->PartitionEntry[] cached array of the corresponding DiskEntry */
WCHAR DeviceName[MAX_PATH]; ///< NT device name: "\Device\HarddiskM\PartitionN"

/** The following properties may be replaced by flags **/

BOOLEAN LogicalPartition;

/* Partition is partitioned disk space */
Expand Down

0 comments on commit e6a7608

Please sign in to comment.