Revision tags: 0.4.16-dev, 0.4.15 |
|
#
d6d3d0ea |
| 30-Aug-2024 |
Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org> |
[SETUPLIB] Add helpers to determine whether a disk is partitioned as a "super-floppy" (#7310)
|
#
e4930be4 |
| 11-May-2024 |
Timo Kreuzer <timo.kreuzer@reactos.org> |
[REACTOS] Use the ISO C and C++ conformant names: _wcsicmp, _stricmp
Stop using non-conforming wcsicmp, stricmp, strcasecmp
|
Revision tags: 0.4.14-release, 0.4.15-dev, 0.4.14-RC, 0.4.13-release, 0.4.14-dev, 0.4.13-RC, 0.4.12-release, 0.4.12-RC, 0.4.13-dev |
|
#
1573461c |
| 07-Mar-2019 |
Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org> |
[SETUP:REACTOS] Add partitioning and formatting support (#7159)
CORE-13525
- Newly-created partitions and unpartitioned space ar reinserted or updated in correct order in the tree-list. Volume-cr
[SETUP:REACTOS] Add partitioning and formatting support (#7159)
CORE-13525
- Newly-created partitions and unpartitioned space ar reinserted or updated in correct order in the tree-list. Volume-creation information data associated with the tree items is persisted across operations.
- Reliably delete data associated to tree-list items via the TVN_DELETEITEM notification. This allows simplifying the cleanup function; keeping simple the code that deletes items when deleting partitions, etc.
- Make the PrintPartitionData() function call itself recursively on extended partitions to display the sub-list of logical partitions.
- Handle the new partition size in MB the same way as in USETUP.
- Allow existing partitions/volumes to be re-formatted, using common code with the partition creation dialog.
- Allow selecting unpartitioned space or non-formatted partitions for installing ReactOS: unused space will automatically be partitioned and non-formatted partitions formatted (the user is prompted for choosing the file system).
- Correctly zero the progress-bar position when starting file copy. - Add missing file copy error handler in FileCopyCallback: just copying what USETUP does.
show more ...
|
#
6f15802a |
| 18-May-2024 |
Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org> |
[SETUPLIB][REACTOS][USETUP] Split FS-volume-specific functionality from partitions (#7258)
CORE-13525
This greatly helps in reducing code complexity in some areas: code that previously iterated ove
[SETUPLIB][REACTOS][USETUP] Split FS-volume-specific functionality from partitions (#7258)
CORE-13525
This greatly helps in reducing code complexity in some areas: code that previously iterated over all partitions of a given disk, just to find which ones were partitioned and contained a valid file system, now just have to iterate over mounted volumes. See in particular, `lib/utils/osdetect.c` and `lib/fsutil.c` .
- Remove FORMATSTATE "Preformatted" enum value; - Cleanup osdetect code after introducing Volume support; - Some simplifications for FormatState.
- Differentiate between 'new' partition and 'new' volume:
* "New" partition: it has been created and added in the cached list, but not yet actually written into the disk.
* "New" volume: newly-created volume (may be backed by a partition or not), not yet formatted. May exist on either new, or not new partition, or elsewhere.
- Cache partition and volume NT device names.
These do not change across repartitioning operations, as long as the partition or the filesystem volume hasn't been deleted/recreated. This avoids doing \Device\Harddisk%u\Partition%u sprintf's everytime we need to retrieve the given partition or volume device name.
When a partition/fileysystem volume is "virtually" created (i.e. in the partition list, but not yet committed to disk and exposed to the OS), no device partition number and device name are available yet. In particular, validate that no manipulation of \Device\HarddiskM\Partition0 (i.e. the whole disk) is being made.
show more ...
|
#
7639cb75 |
| 04-Jul-2024 |
Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org> |
[SETUPLIB][USETUP] Reduce duplicated code
- ScrollDownPartitionList() and ScrollUpPartitionList() --> ScrollUpDownPartitionList()
- GetPrimaryPartitionCount() and GetLogicalPartitionCount() -->
[SETUPLIB][USETUP] Reduce duplicated code
- ScrollDownPartitionList() and ScrollUpPartitionList() --> ScrollUpDownPartitionList()
- GetPrimaryPartitionCount() and GetLogicalPartitionCount() --> generic GetPartitionCount() and macros.
- GetPrevUnpartitionedEntry() and GetNextUnpartitionedEntry() --> GetAdjUnpartitionedEntry() ("Adj" == Adjacent)
show more ...
|
#
97821f00 |
| 02-Jul-2024 |
Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org> |
[SETUPLIB] Fix for GetPartition()
|
#
a7a7e6a0 |
| 23-Nov-2020 |
Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org> |
[SETUPLIB][USETUP] Isolate and decouple the filesystem operations code from the UI (#7049)
The idea is reminiscent of the SetupCommitFileQueue() function: filesystem volume operations are "queued" a
[SETUPLIB][USETUP] Isolate and decouple the filesystem operations code from the UI (#7049)
The idea is reminiscent of the SetupCommitFileQueue() function: filesystem volume operations are "queued" and processed via a "commit queue".
The commit queue uses a user-specified callback, that is used to interact with the user whenever an operation (filesystem formatting, checking) is started, ended, or fails, for example by displaying appropriate UI screens and choices, etc.
show more ...
|
#
a2777cd8 |
| 20-Jun-2024 |
Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org> |
[SETUPLIB] Cleanup some partition getters and remove GetDiskOrPartition.
- osdetect.c: Replace usage of GetDiskOrPartition by SelectPartition.
|
#
99f0937f |
| 06-Jun-2024 |
Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org> |
[SETUPLIB][USETUP] Finish unification of extended and primary/logical partitions
See commits ebcf3cf38 and c9c6902f0 (PR #5837)
In addition, correctly set the type of extended partition being used,
[SETUPLIB][USETUP] Finish unification of extended and primary/logical partitions
See commits ebcf3cf38 and c9c6902f0 (PR #5837)
In addition, correctly set the type of extended partition being used, depending on whether it is contained below or above the 1024-cylinder boundary (tested on NT).
show more ...
|
#
c752e8c0 |
| 21-Feb-2024 |
Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org> |
[SETUPLIB] FindSupportedSystemPartition(): Add missing NULL check
Addendum to commit 59acff79e.
|
#
b7ad4a22 |
| 07-Dec-2023 |
Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org> |
[SETUPLIB][USETUP] Some cleanup for partition code.
- Make the Create*Partition helpers take a size in bytes, not in sectors.
This allows them to be easier to use by the caller, alleviating the
[SETUPLIB][USETUP] Some cleanup for partition code.
- Make the Create*Partition helpers take a size in bytes, not in sectors.
This allows them to be easier to use by the caller, alleviating the need for making the size conversion into sectors. Instead it is done internally by the helpers.
- Introduce helper macros to easily retrieve the size of a partition entry or a disk in bytes, from their internal representation in number of sectors.
- The 'AutoCreate' variable being USETUP-specific, remove it from the PARTENTRY structure and use instead a flag set into the 'New' member.
- Rename IsDiskSizeValid to IsPartitionLargeEnough, to better describe what the function is for.
show more ...
|
#
780c2a03 |
| 16-Nov-2023 |
Serge Gautherie <32623169+SergeGautherie@users.noreply.github.com> |
[SERVICES][SETUPLIB][UMANDLG][USETUP] Add missing \n to DPRINT() calls (#5983)
And promote 1 DPRINT() to DPRINT1.
|
#
ebcf3cf3 |
| 26-Oct-2023 |
Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org> |
[USETUP] Blur the boundaries between MBR "Primary" and "Logical" partitions (#5837)
Do not do that yet for extended partitions (containers).
This is possible, because when creating partitions, we d
[USETUP] Blur the boundaries between MBR "Primary" and "Logical" partitions (#5837)
Do not do that yet for extended partitions (containers).
This is possible, because when creating partitions, we do that on unpartitioned space that is already "tagged" as either being "logical" or not, and the partition style is inherited from that.
The resulting code is simpler, yet working as it should. This will also help in the future for supporting other platforms, where the concept of "primary", "extended" and "logical" partitions do not exist (basically all platforms except BIOS-based PC-AT).
show more ...
|
#
74c0a37e |
| 11-Nov-2020 |
Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org> |
[SETUPLIB][REACTOS][USETUP] Move partition types information to its dedicated file; update MBR partition types and add GPT GUID partition types.
|
#
a59cecd8 |
| 24-Nov-2020 |
Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org> |
[SETUPLIB] Add two hacks in partlist.c for temporarily setting consistently the disk partition style.
Add two hacks in UpdateDiskLayout() and WritePartitions() so that the disk partition style is co
[SETUPLIB] Add two hacks in partlist.c for temporarily setting consistently the disk partition style.
Add two hacks in UpdateDiskLayout() and WritePartitions() so that the disk partition style is consistently set to a known value MBR, especially when that disk was previously new and uninitialized (RAW). A proper fix will be developed later when support for GPT is added.
show more ...
|
#
9735a837 |
| 24-Nov-2020 |
Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org> |
[SETUPLIB] Make InferFileSystem() compatible for both MBR and GPT disks. Simplify the FSREC interface a bit.
Instead of providing an MBR partition type to InferFileSystem(), make it call IOCTL_DISK_
[SETUPLIB] Make InferFileSystem() compatible for both MBR and GPT disks. Simplify the FSREC interface a bit.
Instead of providing an MBR partition type to InferFileSystem(), make it call IOCTL_DISK_GET_PARTITION_INFO(_EX) to determine whether the partition pointed by the path/handle is MBR or GPT. Then, only if it's MBR, we retrieve its partition type in order to "guess" an adequate file system name, in case the latter was not recognized already via regular ways (via GetFileSystemName() / NtQueryVolumeInformationFile()).
- Remove the GetFileSystemNameByHandle() and InferFileSystemByHandle() functions. Instead, make the other GetFileSystemName*() and InferFileSystem*() functions accept a HANDLE as an alternative to the already-existing partition path string. These parameters are exclusive to each other.
- Rename SetPartitionType() -> SetMBRPartitionType(), and FileSystemToPartitionType() -> FileSystemToMBRPartitionType() in order to really clarify what they do (since this code is meant for MBR partitions only, not GPT ones).
show more ...
|
#
b51b8ee2 |
| 11-Oct-2020 |
Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org> |
[SETUPLIB] Move the filesystem recognition helpers to their own file.
|
#
51cb3cc6 |
| 26-Dec-2019 |
Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org> |
[SETUPLIB] Register the \DosDevices\?: drive letter from installation time in the correct SYSTEM\MountedDevices registry key, i.e. the one of the ReactOS being currently installed. CORE-15575
Howeve
[SETUPLIB] Register the \DosDevices\?: drive letter from installation time in the correct SYSTEM\MountedDevices registry key, i.e. the one of the ReactOS being currently installed. CORE-15575
However I now hit a separate bug (see the report) that still prevent the drive letter to be correctly assigned at reboot.
show more ...
|
#
59acff79 |
| 25-Aug-2019 |
Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org> |
[SETUPLIB][USETUP] Slightly modify how and when the HW system partition is detected and used. CORE-16274
SETUPLIB: =========
- Find the system partition initially when we create the list of parti
[SETUPLIB][USETUP] Slightly modify how and when the HW system partition is detected and used. CORE-16274
SETUPLIB: =========
- Find the system partition initially when we create the list of partitions.
- Split the old CheckActiveSystemPartition() helper in two helpers: FindSupportedSystemPartition() and SetActivePartition(). This allows simplifying slightly the former one, and allows the user, in an interactive situation, to decide whether the "supported system partition" found can actually be used or not.
- Remove the "OriginalSystemPartition" hack in the PARTLIST structure. - Add a note regarding the SystemPartition member in PARTLIST.
USETUP: =======
- Use the introduced helpers from above. If the "system" partition we are going to use, in case we install ReactOS on a fixed disk, is *NOT* the same as the original one (e.g. because it is detected to be not supported by ReactOS...), display an informative screen to the user and let him confirm whether or not he wants to change the partition.
If we install on a fixed disk, try to find a supported system partition on the system. Otherwise if we install on a removable disk, use the install partition as the system partition instead.
This allows providing a fix for CORE-16274.
show more ...
|
#
626c654a |
| 24-Aug-2019 |
Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org> |
[SETUPLIB][USETUP] Code simplifications & fixes.
SETUPLIB: =========
- Remove useless HiddenSectors member in PARTENTRY structure. - InsertDiskRegion() helper returns a BOOLEAN success. - CreateIns
[SETUPLIB][USETUP] Code simplifications & fixes.
SETUPLIB: =========
- Remove useless HiddenSectors member in PARTENTRY structure. - InsertDiskRegion() helper returns a BOOLEAN success. - CreateInsertBlankRegion() helper sets LogicalPartition.
- Simplify the InitializePartitionEntry() helper so that its PartEntry parameter is clearly the one that is being initialized (i.e. converted from a blank region to) an actual partition, and use the helper CreateInsertBlankRegion(). The calculations for the StartSector and SectorCount are exactly equivalent with the old version of this function. Also make it return a BOOLEAN success instead. + Add some extra validation checks. + Adjust CreatePrimaryPartition(), CreateExtendedPartition() and CreateLogicalPartition() in this regard.
- Better handling of "RAW"-mounted partitions: treat them as "Unformatted" only if they are RAW *AND* their PartitionType is one of those associated with FAT file-system. Otherwise we cannot decide whether they are indeed unformatted or have an unknown file-system on them, therefore treat them as the latter. In this regard, the IsSupportedActivePartition() helper should not look for FileSystem == RAW but instead only look whether the partition is Unformatted.
This should help with situations similar to the one described in CORE-16274 where a partition with a genuine file-system but not recognized by ReactOS (because we currently do not have the EXT2/3/4 filesystem driver loaded during 1st-stage setup due to commit 5a650f6b) and therefore mounted as RAW, was thought to be unformatted.
USETUP: ======= - Use the "global" SystemPartition pointer: this is the "system" partition we will actually use. It can be different from the actual one of the computer, for example when we install ReactOS on a removable disk. This allows also to simplify the code.
- Remove the single-used DestinationDriveLetter variable.
- Remove BuildInstallPaths() helper and use InitDestinationPaths() directly instead.
- Always mention the disk where the partition being formatted is. - Cleanup old code comments, add assertions here & there...
show more ...
|
#
47a1aced |
| 11-Mar-2019 |
Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org> |
[SETUPLIB][USETUP] Improve disk HW numbering, removable disk support, and "super-floppy" partitioning.
Nowadays more and more people try to install ReactOS from removable drives (e.g. USB sticks) on
[SETUPLIB][USETUP] Improve disk HW numbering, removable disk support, and "super-floppy" partitioning.
Nowadays more and more people try to install ReactOS from removable drives (e.g. USB sticks) onto fixed HDDs, or try to install it into USB sticks too.
Both fixed and removable drives, as well as partitions on these, are represented in NT using the same device name format:
\Device\HarddiskM\PartitionN ,
with an increasing disk number M. Using this number for building the corresponding firmware-specific ARC multi(x)disk(y)rdisk(z) path used by the NT/ROS loader (FreeLdr, ...) is then prone to error since there may have been removable drives inserted and accounted for in the calculation of the disk number. These drives must be correctly subtracted in order to generate the correct ARC path, valid once all the removable drives have been ejected (which should also be the situation seen from the BIOS when booting up, except of course if you boot on a USB stick).
This problem is now solved. Note that it matters only for the disks that have also been enumerated by the firmware (BIOS; Int 13h). We don't have to care about the other drives, since the ARC path will be of a different format and will not use the disk number (instead, the SCSI coordinates are used).
We also try to enumerate all the disks found in all the possible disk adapters and controllers enumerated in the Hardware registry tree (and that are visible by FreeLdr) in order to cover all.
Finally, we detect whether a disk reports as a "super-floppy", i.e. an unpartitioned disk with a valid VBR. This is indeed how a standard floppy disk looks like, or how USB sticks are partitioned on Windows. Such disk is reported has having only one single partition starting at the beginning of the disk, with partition number == 0, its type being FAT16 non-bootable. This allows us to forbid creating any new partitions on such disks. Note that accessing either \Device\HarddiskN\Partition0 or Partition1 on such a disk returns the same data. Note also that on the contrary, regular MBR-partitioned disks would report at least four partitions entries, instead of just one.
The other improvements are:
- Do *NOT* write any MBR on a disk partitioned as "super-floppy". CORE-13703
- Fix the computed disk identifier, of format: %08x-%08x-%c . The numbers are respectively the checksum of the first sector, and the disk signature. The terminating letter is A or X, depending whether the first sector ends with 0x55AA/0xAA55 or not (see also commit 5053f1f5).
- Warn if the user attempts to install ReactOS on a disk that is not visible by the firmware of his computer, because it may not be bootable.
show more ...
|
#
84f3e2df |
| 05-Mar-2019 |
Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org> |
[SETUPLIB][USETUP] Remove CurrentDisk/Partition from the partlist lib code, and move these into the UI code.
- Add also some validation ASSERTs and simplify the code here and there.
- The installat
[SETUPLIB][USETUP] Remove CurrentDisk/Partition from the partlist lib code, and move these into the UI code.
- Add also some validation ASSERTs and simplify the code here and there.
- The installation partition is called "InstallPartition", while the global "CurrentPartition" is the disk region currently selected in the partition UI list, on which prtitioning operations are effectued.
- Extend CheckActiveSystemPartition() to use an optional alternative disk or partition in case the actual system partition (present in the first disk) cannot be used, e.g. because we don't support writes on it.
show more ...
|
Revision tags: 0.4.11-release |
|
#
0d9ebb67 |
| 25-Feb-2019 |
Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org> |
[SETUPLIB] Improve the discovery of the active system partition.
CORE-7749, CORE-6305, CORE-13205
|
#
29cc1843 |
| 24-Feb-2019 |
Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org> |
[SETUPLIB][USETUP] Minor improvements.
- Make some partitioning functions not dependent on the selected "CurrentPartition". - Add some sanity checks. - Improve some of the "is-partitioned" checks.
|
#
c1fbc2d6 |
| 24-Feb-2019 |
Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org> |
[SETUPLIB][USETUP] Factor out the usage of FS provider structures.
Similarly to FMIFS this structure should be private. Instead file-system names are passed to the helper functions, allowing to use
[SETUPLIB][USETUP] Factor out the usage of FS provider structures.
Similarly to FMIFS this structure should be private. Instead file-system names are passed to the helper functions, allowing to use the names returned by the FS drivers. The names are then internally mapped to the corresponding FS providers.
In particular this allows to handle the "RAW" file-system and to assign the 'Unformatted' flag to partitions having this FS.
Finally this helps us refining the checks performed to see whether the current "active" system partition uses a supported file-system.
show more ...
|