reactos/base/setup/lib/utils
Hermès Bélusca-Maïto 6f15802af7
[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.
2024-08-26 16:42:47 +02:00
..
arcname.c [SETUPLIB][USETUP] Reduce duplicated code 2024-07-04 17:14:32 +02:00
arcname.h [SETUPLIB] Move the files that implement utility functions into their own subdirectory. The files remaining in the main directory implement setup procedures that use the utility functions. 2018-10-27 22:09:34 +02:00
arcname_tests.c [SETUPLIB][USETUP] Use NT RTL String Safe functions instead of Win32-oriented ones (and remove usage of HRESULT too). 2018-10-28 00:58:46 +02:00
bldrsup.c [SETUPLIB] Don't flag freeldr.ini as read-only during installation. 2024-05-07 19:30:33 +02:00
bldrsup.h [SETUPLIB] Use new BootPath value for BootSector boot entries (#6815) 2024-05-07 12:33:14 +02:00
devutils.c [SETUPLIB] Add some device utility functions; to be used later (#7258) 2024-08-26 16:42:46 +02:00
devutils.h [SETUPLIB] Add some device utility functions; to be used later (#7258) 2024-08-26 16:42:46 +02:00
filesup.c [SETUPLIB] SetupCreateDirectory(): Don't assume the form of the directory prefix (#7257) 2024-08-22 20:40:35 +02:00
filesup.h [SETUPLIB] SetupCreateDirectory(): Don't assume the form of the directory prefix (#7257) 2024-08-22 20:40:35 +02:00
fsrec.c [SETUPLIB][USETUP] FS utilities: Use the ISO C and C++ conformant name: _wcsicmp 2024-07-01 16:28:17 +02:00
fsrec.h [SETUPLIB] Make InferFileSystem() compatible for both MBR and GPT disks. Simplify the FSREC interface a bit. 2020-11-24 03:24:36 +01:00
genlist.c [SETUPLIB][USETUP] Remove the deprecated GenericListHasSingleEntry() function and use instead GetNumberOfListEntries(). 2018-10-28 15:04:33 +01:00
genlist.h [SETUPLIB][USETUP] Remove the deprecated GenericListHasSingleEntry() function and use instead GetNumberOfListEntries(). 2018-10-28 15:04:33 +01:00
inicache.c [SETUPLIB] Add support for removing sections and key values, and remove some hacks (#6815) 2024-05-05 18:15:31 +02:00
inicache.h [SETUPLIB] Add support for removing sections and key values, and remove some hacks (#6815) 2024-05-05 18:15:31 +02:00
linklist.h [SETUPLIB] Move the files that implement utility functions into their own subdirectory. The files remaining in the main directory implement setup procedures that use the utility functions. 2018-10-27 22:09:34 +02:00
ntverrsrc.c [SETUPLIB] Move the files that implement utility functions into their own subdirectory. The files remaining in the main directory implement setup procedures that use the utility functions. 2018-10-27 22:09:34 +02:00
ntverrsrc.h [SETUPLIB] Move the files that implement utility functions into their own subdirectory. The files remaining in the main directory implement setup procedures that use the utility functions. 2018-10-27 22:09:34 +02:00
osdetect.c [SETUPLIB][REACTOS][USETUP] Split FS-volume-specific functionality from partitions (#7258) 2024-08-26 16:42:47 +02:00
osdetect.h [SETUPLIB][REACTOS][USETUP] Split FS-volume-specific functionality from partitions (#7258) 2024-08-26 16:42:47 +02:00
partinfo.c [SETUPLIB][REACTOS][USETUP] Move partition types information to its dedicated file; update MBR partition types and add GPT GUID partition types. 2021-02-01 01:48:14 +01:00
partinfo.h [SETUPLIB][REACTOS][USETUP] Move partition types information to its dedicated file; update MBR partition types and add GPT GUID partition types. 2021-02-01 01:48:14 +01:00
partlist.c [SETUPLIB][REACTOS][USETUP] Split FS-volume-specific functionality from partitions (#7258) 2024-08-26 16:42:47 +02:00
partlist.h [SETUPLIB][REACTOS][USETUP] Split FS-volume-specific functionality from partitions (#7258) 2024-08-26 16:42:47 +02:00
regutil.c [REACTOS] Fix a number of MSVC warnings 2021-07-23 22:03:48 +02:00
regutil.h [SETUPLIB] Properly cleanup the temporary registry keys created for setting up the registry. 2018-10-28 14:42:01 +01:00
volutil.c [SETUPLIB][REACTOS][USETUP] Split FS-volume-specific functionality from partitions (#7258) 2024-08-26 16:42:47 +02:00
volutil.h [SETUPLIB][REACTOS][USETUP] Split FS-volume-specific functionality from partitions (#7258) 2024-08-26 16:42:47 +02:00