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
shermp
a64a423654
Add helper to create error string from number
2019-11-02 20:01:17 +13:00
shermp
9a6332db64
Add minivhd_create documentation
...
Also rearranges already existing documenttion
2019-11-02 18:08:14 +13:00
shermp
c383e03e5e
Fix compiler warnings
2019-11-01 18:07:25 +13:00
shermp
20949a1c5e
Um... yes, fixed VHD's are supported
2019-11-01 17:56:29 +13:00
shermp
3b159496ac
Add VHD creation support
2019-11-01 11:29:36 +13:00
shermp
a6eb42ecde
Add partial VHD creation. Work not yet finished
2019-06-20 22:00:42 +12:00
shermp
917344cf17
Guard against NULL pointer dereference in mvhd_close
2019-06-15 16:22:29 +12:00
shermp
79593feb01
Implement opening differencing VHD images
2019-06-15 16:20:09 +12:00
shermp
94d04fae6e
Include cwalk 1.2.1
2019-06-14 09:33:51 +12:00
shermp
e16d1cb414
Implement mvhd_format_sectors
2019-06-13 22:24:05 +12:00
shermp
fe03cc7dc2
Document mvhd_fopen function
2019-06-13 21:51:49 +12:00
shermp
0f0119e59d
Cast lengths to ints from size_t
2019-06-13 21:43:43 +12:00
shermp
f35c4eef25
Switch to using mvhd_fopen
2019-06-13 21:33:09 +12:00