[Libguestfs] [PATCH] hivex: Add O_BINARY flag to open calls for platforms where this isn't the default (such as Win32)

Daniel Gillen gillen.daniel at gmail.com
Thu Jun 27 21:29:28 UTC 2013


Hi

As my cross platform registry editor (FRED available from
https://www.pinguin.lu (sorry for advertising but I couldn't resist
;-))) is evolving, I recently added write support to it.

While under Linux everything worked nice, the Windblows build didn't.

It seems that Windows opens files by default in text mode (O_TEXT) which
is a problem. The attached patch adds the O_BINARY flag to all open
calls which solves the issue and allows libhivex to alter hives in Windows.

I don't think this will harm on any other platform, so no fancy ifdefs
this time :)

ok?

cu

-- 
Unix _IS_ user friendly - it's just
selective about who its friends are!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-hivex-Add-O_BINARY-flag-to-open-calls-for-platforms-.patch
Type: text/x-patch
Size: 1136 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20130627/5e4325c2/attachment.bin>


More information about the Libguestfs mailing list