[PATCH spice-gtk 2/4] spicy-screenshot: Open output file as binary

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Windows this prevents LFs to be written as CR+LF.

Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 tools/spicy-screenshot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/spicy-screenshot.c b/tools/spicy-screenshot.c
index 9d7aa34b..0bfd3ca2 100644
--- a/tools/spicy-screenshot.c
+++ b/tools/spicy-screenshot.c
@@ -53,7 +53,7 @@ static int write_ppm_32(void)
     uint8_t *p;
     int n;
 
-    fp = fopen(outf,"w");
+    fp = fopen(outf,"wb");
     if (NULL == fp) {
         fprintf(stderr, "%s: can't open %s: %s\n", g_get_prgname(), outf, strerror(errno));
         return -1;
-- 
2.17.2

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]