From patchwork Thu Aug 31 03:09:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 9931059 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 5F967603FB for ; Thu, 31 Aug 2017 03:10:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5CFD4287B4 for ; Thu, 31 Aug 2017 03:10:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 51200287CC; Thu, 31 Aug 2017 03:10:45 +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=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D6C1C28803 for ; Thu, 31 Aug 2017 03:10:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751419AbdHaDJk (ORCPT ); Wed, 30 Aug 2017 23:09:40 -0400 Received: from pb-smtp2.pobox.com ([64.147.108.71]:58125 "EHLO sasl.smtp.pobox.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751250AbdHaDJi (ORCPT ); Wed, 30 Aug 2017 23:09:38 -0400 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 8534791C1E; Wed, 30 Aug 2017 23:09:37 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:date:message-id:in-reply-to:references; s=sasl; bh=pul/ bqJBGIDrZnZxuDK2tIvPQU0=; b=EvqH0OnvaEZfQ1MH90dzFFgXXE6Q9Zgttr3F Ifodvvz8uGDYHn34W//jrITCBJxsVx50xEEmJkTaoCB5QxxldBWugcm2jyWLzuU3 2Ieiat4Bm950Haek0p4ehWCRN3g432AQNj8KAodQAbHd/K8cXGS+lwqeXJ9JD4YU udCRG9U= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 7994891C1D; Wed, 30 Aug 2017 23:09:37 -0400 (EDT) Received: from yoda.home (unknown [70.80.200.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id E2F4191C18; Wed, 30 Aug 2017 23:09:36 -0400 (EDT) Received: from xanadu.home (xanadu.home [192.168.2.2]) by yoda.home (Postfix) with ESMTP id 35E762DA0205; Wed, 30 Aug 2017 23:09:36 -0400 (EDT) From: Nicolas Pitre To: Alexander Viro Cc: linux-fsdevel@vger.kernel.org, linux-embedded@vger.kernel.org, linux-kernel@vger.kernel.org, Chris Brandt Subject: [PATCH v3 2/5] cramfs: make cramfs_physmem usable as root fs Date: Wed, 30 Aug 2017 23:09:29 -0400 Message-Id: <20170831030932.26979-3-nicolas.pitre@linaro.org> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20170831030932.26979-1-nicolas.pitre@linaro.org> References: <20170831030932.26979-1-nicolas.pitre@linaro.org> X-Pobox-Relay-ID: D21C1608-8DF9-11E7-895E-9D2B0D78B957-78420484!pb-smtp2.pobox.com Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Nicolas Pitre Tested-by: Chris Brandt --- init/do_mounts.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/init/do_mounts.c b/init/do_mounts.c index c2de5104aa..43b5817f60 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c @@ -556,6 +556,14 @@ void __init prepare_namespace(void) ssleep(root_delay); } + if (IS_ENABLED(CONFIG_CRAMFS_PHYSMEM) && root_fs_names && + !strcmp(root_fs_names, "cramfs_physmem")) { + int err = do_mount_root("cramfs", "cramfs_physmem", + root_mountflags, root_mount_data); + if (!err) + goto out; + } + /* * wait for the known devices to complete their probing *