From patchwork Thu Mar 31 15:09:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 8714231 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7F1979F30C for ; Thu, 31 Mar 2016 15:13:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 93693202AE for ; Thu, 31 Mar 2016 15:13:29 +0000 (UTC) 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.kernel.org (Postfix) with ESMTPS id C837520272 for ; Thu, 31 Mar 2016 15:13:28 +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 1aleFL-0006bn-7u; Thu, 31 Mar 2016 15:10:55 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aleFJ-0006bV-DX for xen-devel@lists.xenproject.org; Thu, 31 Mar 2016 15:10:53 +0000 Received: from [193.109.254.147] by server-13.bemta-14.messagelabs.com id E9/66-02874-CFD3DF65; Thu, 31 Mar 2016 15:10:52 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrGIsWRWlGSWpSXmKPExsXitHSDve4f279 hBrP3cVt83zKZyYHR4/CHKywBjFGsmXlJ+RUJrBkbFj9jLbjCXdHb3sjUwNjF1cXIySEh4C8x 98w0JhCbTUBH4uLcnWxdjBwcIgIqErf3GoCEmQWKJb6u6mMFsYUFHCVu3f3LAmKzCKhK7Pi7H yzOK+AscfbSRVaIkboSJ3dvYgexOQVcJG50TmIDsYWAag5+6GGGqBeUODnzCQvEfE2J1u2/2S FseYnmrbOZIeoVJfrnPQA7R0KAW+Jvt/0ERv5ZSLpnIemehaR7ASPzKkb14tSistQiXTO9pKL M9IyS3MTMHF1DQxO93NTi4sT01JzEpGK95PzcTYzA8GMAgh2Mfyc4H2KU5GBSEuU9Yv03TIgv KT+lMiOxOCO+qDQntfgQowwHh5IEb7ANUE6wKDU9tSItMwcYCTBpCQ4eJRHeLJA0b3FBYm5xZ jpE6hSjopQ4rwpIQgAkkVGaB9cGi75LjLJSwryMQIcI8RSkFuVmlqDKv2IU52BUEuadADKFJz OvBG76K6DFTECLt2r8AllckoiQkmpgFFsey6UkeGriRNctv9daTOnz27vqT6CM+sXpzW/O7HJ Zb/8gNUit5eq+usQvLHVO3Zycdwtvu5osKLZ+kLWnlU9rwrt9Fqlfk4/PW7qv9l2wye+prF0d C5QKJTem26lOjfK1z+uUX7H4ssxLyzvh8hNnXai2PbrJ+nrLCle/tBlPft2MYu57psRSnJFoq MVcVJwIAGf4LGi5AgAA X-Env-Sender: prvs=8914c038b=roger.pau@citrix.com X-Msg-Ref: server-3.tower-27.messagelabs.com!1459437050!34537169!1 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 8.28; banners=-,-,- X-VirusChecked: Checked Received: (qmail 37425 invoked from network); 31 Mar 2016 15:10:51 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-3.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 31 Mar 2016 15:10:51 -0000 X-IronPort-AV: E=Sophos;i="5.24,422,1454976000"; d="scan'208";a="350454635" From: Roger Pau Monne To: Date: Thu, 31 Mar 2016 17:09:33 +0200 Message-ID: <1459436979-7475-3-git-send-email-roger.pau@citrix.com> X-Mailer: git-send-email 2.6.4 (Apple Git-63) In-Reply-To: <1459436979-7475-1-git-send-email-roger.pau@citrix.com> References: <1459436979-7475-1-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 X-DLP: MIA1 Cc: Wei Liu , Ian Jackson , Roger Pau Monne Subject: [Xen-devel] [PATCH v3 2/8] hotplug/FreeBSD: add block hotplug script 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-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This is the default hotplug script for block devices. Its only job is to copy the "params" blkback xenstore node to "physical-device". Signed-off-by: Roger Pau Monné Acked-by: Wei Liu --- Cc: Ian Jackson Cc: Wei Liu --- tools/hotplug/FreeBSD/Makefile | 2 +- tools/hotplug/FreeBSD/block | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 tools/hotplug/FreeBSD/block diff --git a/tools/hotplug/FreeBSD/Makefile b/tools/hotplug/FreeBSD/Makefile index 10fce4f..bd7a86f 100644 --- a/tools/hotplug/FreeBSD/Makefile +++ b/tools/hotplug/FreeBSD/Makefile @@ -2,7 +2,7 @@ XEN_ROOT = $(CURDIR)/../../.. include $(XEN_ROOT)/tools/Rules.mk # Xen script dir and scripts to go there. -XEN_SCRIPTS = vif-bridge +XEN_SCRIPTS = vif-bridge block XEN_SCRIPT_DATA = diff --git a/tools/hotplug/FreeBSD/block b/tools/hotplug/FreeBSD/block new file mode 100644 index 0000000..a31cca4 --- /dev/null +++ b/tools/hotplug/FreeBSD/block @@ -0,0 +1,25 @@ +#!/bin/sh -e +# +# FreeBSD hotplug script for attaching disks +# +# Parameters: +# $1: xenstore backend path of the vbd +# $2: action, either "add" or "remove" +# +# Environment variables: +# None +# + +path=$1 +action=$2 +params=$(xenstore-read "$path/params") + +case $action in +add) + xenstore-write $path/physical-device-path $params + exit 0 + ;; +*) + exit 0 + ;; +esac