From patchwork Wed Oct 3 21:35:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 188934 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 08E4A2C031F for ; Thu, 4 Oct 2012 07:35:45 +1000 (EST) Received: from localhost ([::1]:37454 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJWbX-0001aP-6R for incoming@patchwork.ozlabs.org; Wed, 03 Oct 2012 17:35:43 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52758) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJWbP-0001ZI-Od for qemu-devel@nongnu.org; Wed, 03 Oct 2012 17:35:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TJWbO-00081z-IJ for qemu-devel@nongnu.org; Wed, 03 Oct 2012 17:35:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:27795) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJWbO-00081U-9w for qemu-devel@nongnu.org; Wed, 03 Oct 2012 17:35:34 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q93LZBKZ004322 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 3 Oct 2012 17:35:11 -0400 Received: from localhost (ovpn-113-111.phx2.redhat.com [10.3.113.111]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q93LZAYN031502; Wed, 3 Oct 2012 17:35:10 -0400 From: Luiz Capitulino To: mdroth@linux.vnet.ibm.com Date: Wed, 3 Oct 2012 18:35:58 -0300 Message-Id: <1349300158-19113-3-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1349300158-19113-1-git-send-email-lcapitulino@redhat.com> References: <1349300158-19113-1-git-send-email-lcapitulino@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: pbonzini@redhat.com, qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH 2/2] qemu-ga: use state dir from CONFIG_QEMU_LOCALSTATEDIR X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Has the side effect of changing the default directory used to save the freeze status file from /tmp to ${prefix}/var/run. This is a beneficial change for two reasons: 1. FHS states that programs must not assume that files in /tmp will still exist between invocations of the program. This defeats the purpose of the freeze status file 2. FHS dictates that /var/run must be cleaned on boot, this ensures that a stale freeze status file will be removed on boot Signed-off-by: Luiz Capitulino Reviewed-by: Michael Roth --- qemu-ga.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu-ga.c b/qemu-ga.c index b747470..daeaea5 100644 --- a/qemu-ga.c +++ b/qemu-ga.c @@ -40,8 +40,8 @@ #else #define QGA_VIRTIO_PATH_DEFAULT "\\\\.\\Global\\org.qemu.guest_agent.0" #endif -#define QGA_PIDFILE_DEFAULT "/var/run/qemu-ga.pid" -#define QGA_STATEDIR_DEFAULT "/tmp" +#define QGA_STATEDIR_DEFAULT CONFIG_QEMU_LOCALSTATEDIR "/run" +#define QGA_PIDFILE_DEFAULT QGA_STATEDIR_DEFAULT "/qemu-ga.pid" #define QGA_SENTINEL_BYTE 0xFF struct GAState {