From 398c031d82ef28cedd69d5cb0543005e917e9e9e Mon Sep 17 00:00:00 2001
Message-Id: <398c031d82ef28cedd69d5cb0543005e917e9e9e.1367947969.git.minovotn@redhat.com>
In-Reply-To: <707b9b97153063374d2530e72c49b1499fc21af9.1367947969.git.minovotn@redhat.com>
References: <707b9b97153063374d2530e72c49b1499fc21af9.1367947969.git.minovotn@redhat.com>
From: Michal Novotny <minovotn@redhat.com>
Date: Tue, 7 May 2013 18:37:28 +0200
Subject: [PATCH 032/114] Revert "qemu-ga: add ga_open_logfile()"

This reverts commit 084491fe69fe91e58330b1990d86a1886971d006.

Reverting as asked by Laszlo in message <51892739.2030807@redhat.com>
because of the ordering issue (most likely) related to supersed
testing.

Signed-off-by: Michal Novotny <minovotn@redhat.com>
---
 qemu-ga.c | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/qemu-ga.c b/qemu-ga.c
index 30214a2..24d7c76 100644
--- a/qemu-ga.c
+++ b/qemu-ga.c
@@ -261,19 +261,6 @@ void ga_set_response_delimited(GAState *s)
     s->delimit_response = true;
 }
 
-static FILE *ga_open_logfile(const char *logfile)
-{
-    FILE *f;
-
-    f = fopen(logfile, "a");
-    if (!f) {
-        return NULL;
-    }
-
-    qemu_set_cloexec(fileno(f));
-    return f;
-}
-
 #ifndef _WIN32
 static bool ga_open_pidfile(const char *pidfile)
 {
@@ -415,7 +402,7 @@ void ga_unset_frozen(GAState *s)
      * in a frozen state at start up, do it now
      */
     if (s->deferred_options.log_filepath) {
-        s->log_file = ga_open_logfile(s->deferred_options.log_filepath);
+        s->log_file = fopen(s->deferred_options.log_filepath, "a");
         if (!s->log_file) {
             s->log_file = stderr;
         }
@@ -897,7 +884,7 @@ int main(int argc, char **argv)
             become_daemon(pid_filepath);
         }
         if (log_filepath) {
-            FILE *log_file = ga_open_logfile(log_filepath);
+            FILE *log_file = fopen(log_filepath, "a");
             if (!log_file) {
                 g_critical("unable to open specified log file: %s",
                            strerror(errno));
-- 
1.7.11.7

