From patchwork Wed Jun 15 14:10:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: olivier.hardouin@gmail.com X-Patchwork-Id: 637047 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (caladan.dune.hu [78.24.191.180]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rWMQ92xb6z9snm for ; Sat, 18 Jun 2016 00:02:25 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=Lbre19nM; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 652AEB91D0D; Fri, 17 Jun 2016 16:00:11 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP; Fri, 17 Jun 2016 16:00:11 +0200 (CEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 9C666B80309 for ; Wed, 15 Jun 2016 16:10:53 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .gmail. - helo: .mail-lb0-f194.google. - helo-domain: .google.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -7 Received: from mail-lb0-f194.google.com (mail-lb0-f194.google.com [209.85.217.194]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Wed, 15 Jun 2016 16:10:53 +0200 (CEST) Received: by mail-lb0-f194.google.com with SMTP id t6so269555lbv.1 for ; Wed, 15 Jun 2016 07:10:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=lsGyOpFGRuikGp282Y5nDVsenqgr08fO6rHSlPq5d8k=; b=Lbre19nMqismlIoRuSJb9IawaKWD8+Q52ipWwq0X0RYCgCfYZpaam5AYoIN7nL1G1i 37wiiXscrwdvSMRTzmhWOVeNtXCN4Q884VqMhmYsD2UGSbeEk0SPJYfkppW2BY/AyZfa b/eSihipgcH3YXTkpNYNjN92x4YvDX7oitnEhXGC6sAMorzkv6rm5msKr51Yq8E5NI7j l+AVb09zgkd34lPNN3nJSRhUMkBYkWDcTHvg9Qg8bQI+znypktHPazYti38yiNBpNzGZ 48nsV50utaYYKFRgh++O/tp6nzw0XNIMu68ZEL8Hw4vePL1jxu/3YuyLgmf+ypw3vjZO 8RCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=lsGyOpFGRuikGp282Y5nDVsenqgr08fO6rHSlPq5d8k=; b=E0t/2qIgoILyqCfhAGUPFznhRZfV376fYyJDXtvm/ffCYjpNjPsxL8PMoCqZzuWZ+V 82SQ0oXIWHtETNMXaAFCoAs4jZtTHQd5DpKrnczbkRwDm54wHHbPs7aZSqlNJtmJ02Xx J2zlxPWiYFRfFaqWvGFw6Ax7nQc6X6rlm5NqUeHvOiIHwHmtRVUgK8nSYobPSn0+eYLt Pffvir4DwOhJZDF6+JOr6j3exoNpLsqZ7oW6ojEkWjCveYhGVGVwJF/BMQucbshYonX9 L4S+kMLNzD2bcx1kfkEvR7Etu2BQVJtbxjA9qvrkfeLSBJLGJxIetnuqbAUc6Qpyss6I 8rpg== X-Gm-Message-State: ALyK8tLCCNxVYhoTELKRYfaFgc84RkrPd9ub8Il/Y3P+rW7LI2qtmbwG3+B4DHge5bmJHg== X-Received: by 10.28.68.85 with SMTP id r82mr9846651wma.18.1465999852952; Wed, 15 Jun 2016 07:10:52 -0700 (PDT) Received: from ubuntu32bits.eu.thmulti.com ([91.183.48.131]) by smtp.gmail.com with ESMTPSA id z5sm3957366wme.5.2016.06.15.07.10.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 15 Jun 2016 07:10:52 -0700 (PDT) From: olivier.hardouin@gmail.com To: openwrt-devel@lists.openwrt.org, lede-dev@lists.infradead.org Date: Wed, 15 Jun 2016 16:10:23 +0200 Message-Id: <1465999824-20936-3-git-send-email-olivier.hardouin@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1465999824-20936-1-git-send-email-olivier.hardouin@gmail.com> References: <1465999824-20936-1-git-send-email-olivier.hardouin@gmail.com> Subject: [OpenWrt-Devel] [PATCH mountd 3/4] add hotplug events X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" add hotplug events (add, remove) to inform other subsystems remove obsolete /etc/mountd/event call Signed-off-by: Olivier Hardouin --- mount.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mount.c b/mount.c index aaddb70..219146b 100644 --- a/mount.c +++ b/mount.c @@ -161,6 +161,7 @@ static void mount_add_list(char *name, char *dev, char *serial, snprintf(tmp2, 64, "/tmp/run/mountd/%s", dev); symlink(tmp2, tmp); mount_new("/tmp/run/mountd/", dev); + system_printf("ACTION=add DEVICE=%s NAME=%s /sbin/hotplug-call mount", dev, name); } } @@ -734,7 +735,7 @@ static void mount_enum_drives(void) log_printf("removing %s\n", q->dev); snprintf(tmp, 64, "%s%s", uci_path, q->name); unlink(tmp); - system_printf("/etc/mountd/event remove %s %s", q->dev, q->name); + system_printf("ACTION=remove DEVICE=%s NAME=%s /sbin/hotplug-call mount", q->dev, q->name); free(q); mount_dump_uci_state(); system_printf("/etc/fonstated/ReloadSamba");