]> xenbits.xensource.com Git - people/dstodden/blktap.git/commitdiff
vhd-stream: open as binary
authorJake Wires <Jake.Wires@citrix.com>
Wed, 1 Sep 2010 21:13:01 +0000 (14:13 -0700)
committerDaniel Stodden <daniel.stodden@citrix.com>
Tue, 30 Aug 2011 12:52:01 +0000 (13:52 +0100)
vhd/lib/libvhd-stream.c

index e279f45a8abdf558a91480abe6faa9d8fca1d2bd..5323013549b48a55c799bd1d87a9f66df3d7b615 100644 (file)
@@ -372,7 +372,7 @@ vhd_stream_load(FILE *stream)
 
        vhd = NULL;
 
-       vstream = vhd_stream_allocate(stream, "r");
+       vstream = vhd_stream_allocate(stream, "rb");
        if (!vstream) {
                err = -ENOMEM;
                goto out;
@@ -437,7 +437,7 @@ vhd_stream_initialize(FILE *stream, vhd_context_t *in)
        out     = NULL;
        vstream = NULL;
 
-       vstream = vhd_stream_allocate(stream, "w");
+       vstream = vhd_stream_allocate(stream, "wb");
        if (!vstream) {
                err = -ENOMEM;
                goto out;