From patchwork Mon Jun 13 07:49:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 9172245 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1CF3A6086B for ; Mon, 13 Jun 2016 07:51:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0F8C220499 for ; Mon, 13 Jun 2016 07:51:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 048A327AC2; Mon, 13 Jun 2016 07:51:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B508B20499 for ; Mon, 13 Jun 2016 07:51:33 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bCMce-0005x5-1G; Mon, 13 Jun 2016 07:49:24 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bCMcc-0005uM-34 for xen-devel@lists.xenproject.org; Mon, 13 Jun 2016 07:49:22 +0000 Received: from [85.158.139.211] by server-13.bemta-5.messagelabs.com id 3E/9B-16475-1856E575; Mon, 13 Jun 2016 07:49:21 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupnkeJIrShJLcpLzFFi42JxWrohUrchNS7 cYP0EK4vvWyYzOTB6HP5whSWAMYo1My8pvyKBNePH5unsBU18Fcf+bWVuYOzg6WLk5JAQ8Jf4 /n0yC4jNJqAs8bOzlw3EFhHQk2g68JwRxGYW8JJ4se4fkM3BISxgILHnpAhImEVAVeLGr+NMI DavgLPEhPXLWCFGykmcP/6TGaScU8BF4sk7c5CwEFBJw6zDzBC2gkTH9GNQrYISJ2c+YYHYJC Fx8MULZogx3BK3T09lnsDINwtJ2SwkZQsYmVYxahSnFpWlFukamuklFWWmZ5TkJmbm6BoamOr lphYXJ6an5iQmFesl5+duYgQGFAMQ7GA8f9rzEKMkB5OSKK+ET1y4EF9SfkplRmJxRnxRaU5q 8SFGGQ4OJQne/SlAOcGi1PTUirTMHGBow6QlOHiURHiPg6R5iwsSc4sz0yFSpxgVpcR540ASA iCJjNI8uDZYPF1ilJUS5mUEOkSIpyC1KDezBFX+FaM4B6OSMO9ekCk8mXklcNNfAS1mAlrMsS 8aZHFJIkJKqoHRmP1LMQfDOcmwKU1TXaUKOp1U9vRM3DdJc+IC+2UMvdo/srnXblyT3eX3zt7 JdmfYnZnKHprPL3o+ujpFM0VRZmVyiFRhWY+caL/55T7OeUn/1AqZE5jWX5NgOrV6SzhzWUyU 9y5VntYLkm//v+FSi2o4NaNq7kOjMvUnB26+ajb8Gs8fwa/EUpyRaKjFXFScCAACvfmQogIAA A== X-Env-Sender: prvs=9655a08af=wei.liu2@citrix.com X-Msg-Ref: server-5.tower-206.messagelabs.com!1465804157!44533302!4 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 8.46; banners=-,-,- X-VirusChecked: Checked Received: (qmail 22007 invoked from network); 13 Jun 2016 07:49:20 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-5.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 13 Jun 2016 07:49:20 -0000 X-IronPort-AV: E=Sophos;i="5.26,466,1459814400"; d="scan'208";a="359992705" From: Wei Liu To: Xen-devel Date: Mon, 13 Jun 2016 08:49:05 +0100 Message-ID: <1465804155-14469-8-git-send-email-wei.liu2@citrix.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1465804155-14469-1-git-send-email-wei.liu2@citrix.com> References: <1465804155-14469-1-git-send-email-wei.liu2@citrix.com> MIME-Version: 1.0 X-DLP: MIA2 Cc: Ian Jackson , Wei Liu Subject: [Xen-devel] [PATCH 07/17] libxl: honour XEN_LIB_DIR X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Wei Liu Acked-by: Ian Jackson --- Cc: Ian Jackson --- tools/libxl/libxl_dom.c | 4 +++- tools/libxl/libxl_internal.h | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c index 805774f..ec29060 100644 --- a/tools/libxl/libxl_dom.c +++ b/tools/libxl/libxl_dom.c @@ -25,6 +25,8 @@ #include #include +#include "_paths.h" + libxl_domain_type libxl__domain_type(libxl__gc *gc, uint32_t domid) { libxl_ctx *ctx = libxl__gc_owner(gc); @@ -1129,7 +1131,7 @@ const char *libxl__userdata_path(libxl__gc *gc, uint32_t domid, goto out; } uuid_string = GCSPRINTF(LIBXL_UUID_FMT, LIBXL_UUID_BYTES(info.uuid)); - path = GCSPRINTF("/var/lib/xen/userdata-%s.%u.%s.%s", + path = GCSPRINTF(XEN_LIB_DIR "/userdata-%s.%u.%s.%s", wh, domid, uuid_string, userdata_userid); out: diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index ae16c25..6c61b66 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -93,8 +93,8 @@ /* QEMU may be slow to load and start due to a bug in Linux where the I/O * subsystem sometime produce high latency under load. */ #define LIBXL_DEVICE_MODEL_START_TIMEOUT 60 -#define LIBXL_DEVICE_MODEL_SAVE_FILE "/var/lib/xen/qemu-save" /* .$domid */ -#define LIBXL_DEVICE_MODEL_RESTORE_FILE "/var/lib/xen/qemu-resume" /* .$domid */ +#define LIBXL_DEVICE_MODEL_SAVE_FILE XEN_LIB_DIR "/qemu-save" /* .$domid */ +#define LIBXL_DEVICE_MODEL_RESTORE_FILE XEN_LIB_DIR "/qemu-resume" /* .$domid */ #define LIBXL_STUBDOM_START_TIMEOUT 30 #define LIBXL_QEMU_BODGE_TIMEOUT 2 #define LIBXL_XENCONSOLE_LIMIT 1048576