From patchwork Wed Aug 16 17:35:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 9904409 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 BE22360244 for ; Wed, 16 Aug 2017 17:36:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AAC0B28949 for ; Wed, 16 Aug 2017 17:36:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9FCC5289F7; Wed, 16 Aug 2017 17:36:21 +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=unavailable 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 33C6128949 for ; Wed, 16 Aug 2017 17:36:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752504AbdHPRgH (ORCPT ); Wed, 16 Aug 2017 13:36:07 -0400 Received: from pb-smtp2.pobox.com ([64.147.108.71]:51871 "EHLO sasl.smtp.pobox.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752477AbdHPRgF (ORCPT ); Wed, 16 Aug 2017 13:36:05 -0400 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 65945A2AB7; Wed, 16 Aug 2017 13:35:57 -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=FRW4 h7LOGDi0rkk6CzRZnQnfVq4=; b=J+FSJHxTz9+bVarkO8RZJg6ljWmuw1MTtQNi jyhknqXvVjTMQU9PCwI8JBSdvH+CCQoKVWpNVPCRHApfwOpvB4TLwRjw8UB6SK5L 3N6SpweJdf5gL5v/SJ3YHF61kz5rq/38rzSWc9YMzMUwpEVSkqu8SQY2S9wNaG2H d5hsJsQ= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 57F57A2AB6; Wed, 16 Aug 2017 13:35:57 -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 C25E3A2AB3; Wed, 16 Aug 2017 13:35:56 -0400 (EDT) Received: from xanadu.home (xanadu.home [192.168.2.2]) by yoda.home (Postfix) with ESMTP id 1DA592DA055A; Wed, 16 Aug 2017 13:35:56 -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 v2 2/5] cramfs: make cramfs_physmem usable as root fs Date: Wed, 16 Aug 2017 13:35:33 -0400 Message-Id: <20170816173536.1879-3-nicolas.pitre@linaro.org> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20170816173536.1879-1-nicolas.pitre@linaro.org> References: <20170816173536.1879-1-nicolas.pitre@linaro.org> X-Pobox-Relay-ID: 5C532F3E-82A9-11E7-84BE-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 --- 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 *