char-file.c (2d6752d38d8acda6aae674a72b72be05482a58eb) char-file.c (541815ff7f54f45a60d058b1c499c4affff094e0)
1/*
2 * QEMU System Emulator
3 *
4 * Copyright (c) 2003-2008 Fabrice Bellard
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights

--- 51 unchanged lines hidden (view full) ---

60
61 out = CreateFile(file->out, accessmode, FILE_SHARE_READ, NULL, flags,
62 FILE_ATTRIBUTE_NORMAL, NULL);
63 if (out == INVALID_HANDLE_VALUE) {
64 error_setg(errp, "open %s failed", file->out);
65 return;
66 }
67
1/*
2 * QEMU System Emulator
3 *
4 * Copyright (c) 2003-2008 Fabrice Bellard
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights

--- 51 unchanged lines hidden (view full) ---

60
61 out = CreateFile(file->out, accessmode, FILE_SHARE_READ, NULL, flags,
62 FILE_ATTRIBUTE_NORMAL, NULL);
63 if (out == INVALID_HANDLE_VALUE) {
64 error_setg(errp, "open %s failed", file->out);
65 return;
66 }
67
68 qemu_chr_open_win_file(chr, out);
68 win_chr_set_file(chr, out, false);
69#else
70 int flags, in = -1, out;
71
72 flags = O_WRONLY | O_CREAT | O_BINARY;
73 if (file->has_append && file->append) {
74 flags |= O_APPEND;
75 } else {
76 flags |= O_TRUNC;

--- 63 unchanged lines hidden ---
69#else
70 int flags, in = -1, out;
71
72 flags = O_WRONLY | O_CREAT | O_BINARY;
73 if (file->has_append && file->append) {
74 flags |= O_APPEND;
75 } else {
76 flags |= O_TRUNC;

--- 63 unchanged lines hidden ---