From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755229AbbAGUxY (ORCPT ); Wed, 7 Jan 2015 15:53:24 -0500 Received: from e8.ny.us.ibm.com ([32.97.182.138]:48135 "EHLO e8.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754980AbbAGUxV (ORCPT ); Wed, 7 Jan 2015 15:53:21 -0500 From: Mimi Zohar To: initramfs Cc: Mimi Zohar , Al Viro , linux-ima-devel@lists.sourceforge.net, linux-security-module , linux-kernel Subject: [RFC][PATCH 9/9] init: remove "root=" command line option test for tmpfs decision Date: Wed, 7 Jan 2015 15:53:00 -0500 Message-Id: <1420663980-20842-10-git-send-email-zohar@linux.vnet.ibm.com> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1420663980-20842-1-git-send-email-zohar@linux.vnet.ibm.com> References: <1420663980-20842-1-git-send-email-zohar@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15010720-0029-0000-0000-0000019C4C36 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The "root=" option is interpreted by the kernel sometimes and passed on to userspace other times. Based on whether the "root=" boot command line option is specified, the initramfs uses tmpfs or ramfs as the rootfs. This is a temporary patch that removes the "root=" test in the decision to use tmpfs or ramfs as the rootfs. Modify userspace applications (eg. dracut, systemd) to support "ROOT=" in addition to "root=". (Not to be upstreamed.) Signed-off-by: Mimi Zohar --- init/do_mounts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init/do_mounts.c b/init/do_mounts.c index 82f2288..b2f5e7d 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c @@ -622,7 +622,7 @@ int __init init_rootfs(void) if (err) return err; - if (IS_ENABLED(CONFIG_TMPFS) && !saved_root_name[0] && + if (IS_ENABLED(CONFIG_TMPFS) && (!root_fs_names || strstr(root_fs_names, "tmpfs"))) { err = shmem_init(); is_tmpfs = true; -- 1.8.1.4