170 Commits

Author SHA1 Message Date
Sherman Perry
bd02b4ad42 Merge pull request #10 from VARCem/master
Updated build system to properly create libraries.
2021-04-18 10:10:55 +12:00
waltje
48a7bd3cbd Updated build system to properly create libraries.
Added my name to Authors in files I worked on.
2021-04-17 01:20:38 -04:00
Sherman Perry
dbee2439c2 Merge pull request #9 from VARCem/master
Small updates.
2021-03-24 11:52:27 +13:00
waltje
d21edd3f48 Updated test files.
Added mvhd_get_type() function.
2021-03-23 18:28:08 -04:00
waltje
810455f94b Textual corrections- no code changes. 2021-03-23 00:04:47 -04:00
Sherman Perry
c644da98bf Merge pull request #8 from VARCem/master
Full re-work into a buildable (shared+static) library plus test tools.
2021-03-18 18:49:58 +13:00
waltje
7bb6e8c9ca Some textual changes, as requested. 2021-03-18 01:25:24 -04:00
waltje
7acd0be766 Updated files as per request.
Moved cookies etc from util.c to create.c, updated create* functions to use the cookies instead of hardcoded values.
Added docs/ folder with Microsoft VHD_CLEARBIT(x) specifications for completeness.
Fixed typos in Makefiles.
2021-03-16 16:45:45 -04:00
waltje
456fc88daf Updated BUILDING document. 2021-03-16 00:25:48 -04:00
waltje
6625009256 Last two ones. Phew! 2021-03-16 00:21:59 -04:00
waltje
f6a2081872 More removal of old stuff. 2021-03-16 00:20:41 -04:00
waltje
0215868ac5 Removed old test tool. 2021-03-16 00:18:42 -04:00
waltje
ba95d21d18 Full re-work as a standalone library with test tools. 2021-03-16 00:16:28 -04:00
shermp
01ba2acb56 Move loop var declaration out of loop - From Greatpsycho
Apparently, the Centos compiler doesn't like C99 style loop var
declaration without specififying --std=c99 or -std=gnu99 in CFLAGS
2020-11-23 09:51:52 +13:00
Sherman Perry
c55bf8eb4c Merge pull request #6 from sards3/master
Fix bug in multi-sector writes for sparse VHDs.
2020-11-21 23:33:51 +13:00
sards3
026e834aa4 Fix bug in multi-sector writes for sparse VHDs. 2020-11-21 03:52:54 -06:00
shermp
8c1490c263 Add convenience size/geom functions to public API 2020-11-21 14:33:38 +13:00
shermp
5880f9d032 Fix EOF
(I always forget about this, then github complains)
2020-11-21 12:25:21 +13:00
shermp
bf4212cdee Avoid MVHDMeta double typdef 2020-11-21 12:15:30 +13:00
shermp
10903f1b32 More cross-platform stdio fixes 2020-11-19 11:42:33 +13:00
shermp
133f072851 Fix stdio operations in linux 2020-11-19 01:57:17 +13:00
shermp
61d744ca8b Fix header guard 2020-11-19 01:56:45 +13:00
shermp
928870b3a6 Remove '_s' functions, as they are not portable enough
This was discovered when the code was integrated with PCem, and tested by others.
2020-11-15 23:05:52 +13:00
shermp
a73d10432e Add function to update diff VHD parent timestamp 2020-11-14 15:39:57 +13:00
shermp
83ab2fbada Make mismatched timestamps non-fatal 2020-11-14 14:46:40 +13:00
shermp
9627888103 Check timestamp when opening parent VHD 2020-11-14 14:40:38 +13:00
shermp
4daa80be14 Add parent modified timestamp when creating differencing VHD's 2020-11-14 14:22:09 +13:00
shermp
344de05468 Fix 'mvhd_file_mod_timestamp' return value 2020-11-14 14:09:58 +13:00
shermp
e1c3ec5f87 Minor error detection fixes during creation 2020-11-14 13:57:55 +13:00
shermp
dadd2432f9 Add get modified timestamp function 2020-11-14 13:46:54 +13:00
Sherman Perry
b9b66606fb Merge pull request #4 from sards3/master
Fix bugs, squash warnings, make more portable, etc.
2020-11-14 11:53:51 +13:00
Stephen McKinney
bea38dbd86 Slight rework to allow creation of VHDs of arbitrary size up to the max of 2040 GB, unconstrained by the CHS geometry. Also allow block sizes other than 2 MB. 2020-11-13 03:57:58 -06:00
Stephen McKinney
dcf1a63191 Revert "Slight rework to allow creation of VHDs of arbitrary size up to the max of 2040 GB, unconstrained by the CHS geometry. Also allow block sizes other than 2 MB."
This reverts commit caaf48e528.
2020-11-13 03:55:34 -06:00
Stephen McKinney
caaf48e528 Slight rework to allow creation of VHDs of arbitrary size up to the max of 2040 GB, unconstrained by the CHS geometry. Also allow block sizes other than 2 MB. 2020-11-13 03:50:32 -06:00
Stephen McKinney
4c6ffbd14b Diff VHD creation: change plat_data_space to store the number of bytes, not the number of sectors. This is counter to the VHD spec, but it's what Hyper-V, VPC, VirtualBox do. 2020-11-07 02:09:35 -06:00
Stephen McKinney
4546b616f6 mvhd_gen_par_loc: Fix the data offset for the second parent locator. 2020-11-06 06:11:11 -06:00
Stephen McKinney
cbc1b74790 Rename w2*u_path to w2*u_path_buff.
Remove unneeded NULL checks before free().
2020-11-05 15:35:00 -06:00
Stephen McKinney
c2f95acbc7 Improvements to the progress callback:
Remove _t from typedef.
Add total sectors parameter.
Remove unneeded pos parameter from mvhd_create_fixed.
Remove progress callbacks from dynamic/diff creation funcitons.
2020-11-05 15:29:26 -06:00
Stephen McKinney
83e8ff4eb7 Fixed bug in mvhd_create_sparse_diff (w2ku_path and w2ru_path were NULL and never populated).
Fixed bug in mvhd_sparse_read (needed an fseek after doing memset(buff, 0, MVHD_SECTOR_SIZE)).
Added progress callbacks to the mvhd_create_* functions.
Converted all use of ftello64 and fseeko64 to new portable versions: mvhd_ftello64 and mvhd_fseeko64.
Addes some explicit casts and other fixes to remove compiler warnings.
2020-11-05 01:58:49 -06:00
shermp
3c54ca311a Added basic credits file 2019-11-16 01:04:01 +13:00
shermp
1f7911496d Remove volatile int nonsense 2019-11-16 00:54:42 +13:00
shermp
3e43f4b324 Change license from GPLv2 to MIT
Should hopefully lower any barriers for others to include in their projects
2019-11-16 00:52:42 +13:00
shermp
dfec3be970 Remove bswap.h in favor of internal endian handling
Doing this because the license of bswap.h that was obtained from PCem
is unkown to me, and I must assume it's GPLv2
2019-11-16 00:51:42 +13:00
shermp
7f45d0d0e2 Update readme 2019-11-15 22:39:44 +13:00
shermp
64310d92a9 Use internal UUID generater always 2019-11-15 22:01:45 +13:00
shermp
6ccd641d7a Oops. Fix that arithmetic error 2019-11-15 21:19:37 +13:00
shermp
257e6f3137 Expand test program with conversion 2019-11-15 20:36:21 +13:00
shermp
cdb43be4ee Added initial raw image conversion 2019-11-15 18:55:56 +13:00
shermp
437f79e923 Alter mvhd_calculate_geometry to use bytes as param 2019-11-05 19:29:57 +13:00
shermp
cf010b6a63 Remove new_size output from calculate_geometry
I realised an using an int was perhaps not the best data type...
2019-11-03 11:15:01 +13:00