sim-card
/
qemu
Archived
10
0
Fork 0

vvfat fixes (Roger Lathrop)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2152 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
bellard 2006-09-09 12:03:20 +00:00
parent e4a89056df
commit 6bcb76c3b6
1 changed files with 2 additions and 2 deletions

View File

@ -61,7 +61,7 @@ void nonono(const char* file, int line, const char* msg) {
exit(-5);
}
#undef assert
#define assert(a) if (!(a)) nonono(__FILE__, __LINE__, #a)
#define assert(a) do {if (!(a)) nonono(__FILE__, __LINE__, #a);}while(0)
#endif
#else
@ -2174,7 +2174,7 @@ static int commit_one_file(BDRVVVFATState* s,
for (i = s->cluster_size; i < offset; i += s->cluster_size)
c = modified_fat_get(s, c);
fd = open(mapping->path, O_RDWR | O_CREAT, 0666);
fd = open(mapping->path, O_RDWR | O_CREAT | O_BINARY, 0666);
if (fd < 0) {
fprintf(stderr, "Could not open %s... (%s, %d)\n", mapping->path,
strerror(errno), errno);