Apply changes from PR #15 for UDFS (C++ to C conversion)#304
Draft
Copilot wants to merge 6 commits into
Draft
Conversation
- Rename all .cpp source files to .c - Update CMakeLists.txt: .cpp -> .c, remove C++-specific warning flags - struct.h: Add C typedef forward declarations, replace using/static_assert/enum with C equivalents, add placeholder members to empty structs - protos.h: Remove extern "C" from DriverEntry, add typedef for TYPE_OF_ACQUIRE enum - Include/phys_lib.h: Remove default parameter values (= 0) from UDFTRead/UDFTWrite - Include/mem_tools.h: Wrap internal memmanager declarations in #ifdef, change inline to static inline - Include/Sys_spec_lib.h: Add ULONG_PTR cast for pointer-to-integer conversion - Include/string_lib.c: Remove extern "C" linkage specifiers - Include/phys_lib.c: Fix IOCTL argument order, remove unreachable code, add explicit Flags=0 arguments - strucsup.c: Change standalone inline to static inline - misc.c: Change false to FALSE - fscntrl.c: Replace auto with explicit type, use _SEH2 macros for SEH - write.c: Add explicit Flags=0 argument to UDFTWrite, fix LARGE_INTEGER initializers - verfysup.c: Add default case to switch statement - env_spec.c: Remove unused PVCB Vcb = NULL variables - udf_info/udf_info.c: Fix return type in UDFReadTagged - udf_info/ecma_167.h: Add C typedef aliases for struct types Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Zero3K20 <258969903+Zero3K20@users.noreply.github.com>
Copilot stopped work on behalf of
Zero3K20 due to an error
April 27, 2026 20:14
Owner
|
@copilot Please continue from where the rate limit was hit. |
…functions Agent-Logs-Url: https://github.com/Zero3K20/reactos/sessions/d198a06e-6980-41da-9b86-185fb05f968d Co-authored-by: Zero3K20 <258969903+Zero3K20@users.noreply.github.com>
Author
Continued from where we left off. The additional fixes applied in commit
All checklist items from the PR description are now complete. |
Copilot
AI
changed the title
[WIP] Apply changes from PR #15 for UDFS
Apply changes from PR #15 for UDFS (C++ to C conversion)
Apr 28, 2026
This was referenced Apr 30, 2026
Copilot AI
added a commit
that referenced
this pull request
May 1, 2026
…304) Agent-Logs-Url: https://github.com/Zero3K20/reactos/sessions/b756d727-b575-4691-98ee-81d66d3c4b08 Co-authored-by: Zero3K20 <258969903+Zero3K20@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Converts the UDFS filesystem driver from C++ to C by applying the changes from assorted/reactos PR #15.
Changes Made
File Renames
.cppsource files to.cinudfs/,udf_info/, andInclude/Build System
CMakeLists.txt: changed.cppto.cin SOURCE list, removed-fpermissive,-Wno-invalid-offsetof(GCC), and-Wno-extern-c-compat(Clang)Header Fixes
struct.h: Added C typedef forward declarations, replacedusing X = Y*withtypedef Y* X, replacedstatic_assertwithC_ASSERT, addedUCHAR Placeholderto emptyFCB_DATA/FCB_INDEXstructs, converted enums totypedef enumprotos.h: Removedextern "C"fromDriverEntry, addedtypedef enum TYPE_OF_ACQUIRE TYPE_OF_ACQUIRE, changed 5 standaloneinlinefunctions tostatic inlineudffs.h: Changed 3 standaloneinlinefunctions tostatic inlineInclude/phys_lib.h: Removed C++ default parameter values fromUDFTRead/UDFTWriteInclude/mem_tools.h: Added#ifdef MY_USE_INTERNAL_MEMMANAGERguard around function declarations, changedinlinetostatic inlineInclude/Sys_spec_lib.h: Fixed(LONGLONG)Vcb→(LONGLONG)(ULONG_PTR)Vcbudf_info/ecma_167.h: Added struct typedefsSource File Fixes
Include/string_lib.c: Removed 4extern "C"from function definitionsInclude/phys_lib.c: Fixed IOCTL argument order, removed unused variables, added explicitFlags=0toUDFReadSectors/UDFWriteSectorscallsstrucsup.c: Changed 7inlinetostatic inline, changedFILE_ID FileId{}toFILE_ID FileId = {0}, replacedRTL_CONSTANT_STRINGassignments withRtlInitUnicodeStringcallsmisc.c: ChangedfalsetoFALSEfscntrl.c: Changedauto RealDevicetoPDEVICE_OBJECT RealDevice, fixed__try/__exceptto_SEH2_TRY/_SEH2_EXCEPT/_SEH2_ENDinUDFGetVolumeBitmapwrite.c: Added explicitFlags=0toUDFTWritecall, fixedLARGE_INTEGERinitialization to{{0, 0}}env_spec.c: Removed 2 unusedPVCB Vcb = NULLdeclarationsverfysup.c: Addeddefault: breakcase in switch statementudf_info/udf_info.c: Fixedreturn NULL→return STATUS_UNSUCCESSFULinUDFReadTaggedudf_info/alloc.c: Fixed parameter types (PLONG_AD→PSHORT_AD/PEXT_AD) in function signaturessys_spec.c,mem.c,misc.c,udf_info/physical.c: Updated#includepaths from.cppto.c