From patchwork Wed Dec 17 19:33:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 422357 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 93BB71400E9 for ; Thu, 18 Dec 2014 06:33:49 +1100 (AEDT) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 5ED04284E91; Wed, 17 Dec 2014 20:31:50 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, T_DKIM_INVALID autolearn=no version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id D5A712802B9 for ; Wed, 17 Dec 2014 20:31:46 +0100 (CET) X-policyd-weight: using cached result; rate: -8.5 Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com [209.85.212.169]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Wed, 17 Dec 2014 20:31:46 +0100 (CET) Received: by mail-wi0-f169.google.com with SMTP id r20so18098809wiv.4 for ; Wed, 17 Dec 2014 11:33:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=6exYwJA6d4EU1HWSPJndRwzeTB6e8qZ/AQOr9GYZA/M=; b=r+fJKDMbJxn5d/AS0hwvC8mCCY23FwPUjj0fRnGpZICvv6yFNbBVKezZ2HotrBnabu hzbjAouN7eEU7W056XIe8tAziFOlpGDvAAoZZcsniuyEMiOPBsqgmz1L2wb28xmsM/M4 esqf8+3GXubWDLwOJkjBHtga98wiipWDJc01dw/2xLmdytw2XEym9m3tcT6gUubaVcpA mIX/C95ksDXgmTcaTKYLrhAVPWpLQCpA5MJNwyC+EbcXgBVyRP6d4QXTHgJpRwaVVI+F EbOD+jszvfepPhdY4m9g5v9OdkbZRFHxJ4Ek0jlixXSLn1M30XxNB2Sgl23HeWwmvy9E exww== X-Received: by 10.194.8.232 with SMTP id u8mr48240398wja.47.1418844816868; Wed, 17 Dec 2014 11:33:36 -0800 (PST) Received: from linux-tdhb.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by mx.google.com with ESMTPSA id be4sm22077036wib.16.2014.12.17.11.33.35 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Dec 2014 11:33:35 -0800 (PST) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: Felix Fietkau Date: Wed, 17 Dec 2014 20:33:28 +0100 Message-Id: <1418844808-2820-1-git-send-email-zajec5@gmail.com> X-Mailer: git-send-email 1.8.4.5 MIME-Version: 1.0 Cc: openwrt-devel@lists.openwrt.org Subject: [OpenWrt-Devel] [PATCH fstools] block: allow mounting UBIFS partition as extroot X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" Signed-off-by: Rafał Miłecki --- block.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/block.c b/block.c index 68cfd5a..107ba64 100644 --- a/block.c +++ b/block.c @@ -598,6 +598,10 @@ static void check_filesystem(struct blkid_struct_probe *pr) struct stat statbuf; char *e2fsck = "/usr/sbin/e2fsck"; + /* UBIFS does not need stuff like fsck */ + if (!strncmp(pr->id->name, "ubifs", 5)) + return; + if (strncmp(pr->id->name, "ext", 3)) { ERROR("check_filesystem: %s is not supported\n", pr->id->name); return; @@ -974,7 +978,8 @@ static int mount_extroot(char *cfg) pr = find_block_info(m->uuid, m->label, m->device); } if (pr) { - if (strncmp(pr->id->name, "ext", 3)) { + if (strncmp(pr->id->name, "ext", 3) && + strncmp(pr->id->name, "ubifs", 5)) { ERROR("extroot: %s is not supported, try ext4\n", pr->id->name); return -1; }