From patchwork Fri Jul 1 18:56:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 643200 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rh5H422fsz9s9x for ; Sat, 2 Jul 2016 04:56:31 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id AEF1D98351; Fri, 1 Jul 2016 18:56:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Db7D7yfcNYiD; Fri, 1 Jul 2016 18:56:25 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 65FB198341; Fri, 1 Jul 2016 18:56:25 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 13E0D1C0FD2 for ; Fri, 1 Jul 2016 18:56:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 0FC2B98341 for ; Fri, 1 Jul 2016 18:56:24 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id O+nOoGHtABX1 for ; Fri, 1 Jul 2016 18:56:23 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by hemlock.osuosl.org (Postfix) with ESMTP id 77AA898340 for ; Fri, 1 Jul 2016 18:56:23 +0000 (UTC) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP; 01 Jul 2016 11:56:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,558,1459839600"; d="scan'208";a="728044999" Received: from black.fi.intel.com ([10.237.72.93]) by FMSMGA003.fm.intel.com with ESMTP; 01 Jul 2016 11:56:21 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id AA1C314E; Fri, 1 Jul 2016 21:56:20 +0300 (EEST) From: Andy Shevchenko To: Peter Korsgaard , "Yann E. MORIN" , buildroot@buildroot.org Date: Fri, 1 Jul 2016 21:56:19 +0300 Message-Id: <1467399379-945-1-git-send-email-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.8.1 Cc: Andy Shevchenko Subject: [Buildroot] [PATCH v1 1/1] package/busybox: support spaces in module aliases in mdev X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The new change which enabled automatic module loading on boot does not handle the cases when module alias includes spaces. It prevents modules to be loaded since script fails: % find /sys/ -name modalias | xargs sort -u sort: /sys/devices/platform/Fixed: No such file or directory First alias in question is "platform:Fixed MDIO bus". Amend the script to support above like cases. Fixes: 07f46c2b6dae ("package/busybox: support automatic module loading with mdev") Signed-off-by: Andy Shevchenko --- package/busybox/S10mdev | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package/busybox/S10mdev b/package/busybox/S10mdev index 4cb31de..f72c43f 100644 --- a/package/busybox/S10mdev +++ b/package/busybox/S10mdev @@ -9,7 +9,9 @@ case "$1" in echo /sbin/mdev >/proc/sys/kernel/hotplug /sbin/mdev -s # coldplug modules - find /sys/ -name modalias | xargs sort -u | xargs modprobe -abq + find /sys -name modalias -print0 | xargs -0 sort -u | while read ma; do + modprobe -bq "$ma" + done ;; stop) ;;