From 7d6e45733a473e018f04b53922bc31b6af5c6947 Mon Sep 17 00:00:00 2001 From: Alberto Fustinoni Date: Tue, 20 Jun 2017 01:05:29 +0900 Subject: [PATCH] filestream --- core/cart_hw/svp/ssp16.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/cart_hw/svp/ssp16.c b/core/cart_hw/svp/ssp16.c index f2f648c..f48a882 100644 --- a/core/cart_hw/svp/ssp16.c +++ b/core/cart_hw/svp/ssp16.c @@ -190,7 +190,7 @@ */ #include "shared.h" - +#include "streams/file_stream.h" #define u32 unsigned int @@ -1016,13 +1016,13 @@ static void debug_dump_mem(void) static void debug_dump2file(const char *fname, void *mem, int len) { - FILE *f = fopen(fname, "wb"); + RFILE *f = filestream_open(fname, RFILE_MODE_WRITE, -1); unsigned short *p = mem; int i; if (f) { for (i = 0; i < len/2; i++) p[i] = (p[i]<<8) | (p[i]>>8); - fwrite(mem, 1, len, f); - fclose(f); + filestream_write(f, mem, len); + filestream_close(f); for (i = 0; i < len/2; i++) p[i] = (p[i]<<8) | (p[i]>>8); printf("dumped to %s\n", fname); }