/*
 * init/noinitramfs.c
 *
 * Copyright (C) 2006, NXP Semiconductors, All Rights Reserved
 * Author: Jean-Paul Saman <jean-paul.saman@nxp.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; version 2 of the License.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 */
#include <linux/init.h>
#include <linux/stat.h>
#include <linux/kdev_t.h>
#include <linux/syscalls.h>

/*
 * Create a simple rootfs that is similar to the default initramfs
 */
static int __init default_rootfs(void)
{
	int err;

	err = sys_mkdir((const char __user __force *) "/dev", 0755);
	if (err < 0)
		goto out;

	err = sys_mknod((const char __user __force *) "/dev/console",
			S_IFCHR | S_IRUSR | S_IWUSR,
			new_encode_dev(MKDEV(5, 1)));
	if (err < 0)
		goto out;

	err = sys_mkdir((const char __user __force *) "/root", 0700);
	if (err < 0)
		goto out;

	return 0;

out:
	printk(KERN_WARNING "Failed to create a rootfs\n");
	return err;
}
rootfs_initcall(default_rootfs);
>
<table class='tabs'><tr><td>
<a href='/cgit.cgi/linux/net-next.git/?h=nds-private-remove'>summary</a><a href='/cgit.cgi/linux/net-next.git/refs/?h=nds-private-remove&amp;id=94c3e614df2117626fccfac8f821c66e30556384'>refs</a><a class='active' href='/cgit.cgi/linux/net-next.git/log/include/soc/tegra/pmc.h?h=nds-private-remove'>log</a><a href='/cgit.cgi/linux/net-next.git/tree/include/soc/tegra/pmc.h?h=nds-private-remove&amp;id=94c3e614df2117626fccfac8f821c66e30556384'>tree</a><a href='/cgit.cgi/linux/net-next.git/commit/include/soc/tegra/pmc.h?h=nds-private-remove&amp;id=94c3e614df2117626fccfac8f821c66e30556384'>commit</a><a href='/cgit.cgi/linux/net-next.git/diff/include/soc/tegra/pmc.h?h=nds-private-remove&amp;id=94c3e614df2117626fccfac8f821c66e30556384'>diff</a></td><td class='form'><form class='right' method='get' action='/cgit.cgi/linux/net-next.git/log/include/soc/tegra/pmc.h'>
<input type='hidden' name='h' value='nds-private-remove'/><input type='hidden' name='id' value='94c3e614df2117626fccfac8f821c66e30556384'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/cgit.cgi/linux/net-next.git/log/?h=nds-private-remove&amp;id=94c3e614df2117626fccfac8f821c66e30556384'>root</a>/<a href='/cgit.cgi/linux/net-next.git/log/include?h=nds-private-remove&amp;id=94c3e614df2117626fccfac8f821c66e30556384'>include</a>/<a href='/cgit.cgi/linux/net-next.git/log/include/soc?h=nds-private-remove&amp;id=94c3e614df2117626fccfac8f821c66e30556384'>soc</a>/<a href='/cgit.cgi/linux/net-next.git/log/include/soc/tegra?h=nds-private-remove&amp;id=94c3e614df2117626fccfac8f821c66e30556384'>tegra</a>/<a href='/cgit.cgi/linux/net-next.git/log/include/soc/tegra/pmc.h?h=nds-private-remove&amp;id=94c3e614df2117626fccfac8f821c66e30556384'>pmc.h</a></div><div class='content'><table class='list nowrap'><tr class='nohover'><th class='left'>Age</th><th class='left'>Commit message (<a href='/cgit.cgi/linux/net-next.git/log/include/soc/tegra/pmc.h?h=nds-private-remove&amp;id=94c3e614df2117626fccfac8f821c66e30556384&amp;showmsg=1'>Expand</a>)</th><th class='left'>Author</th><th class='left'>Files</th><th class='left'>Lines</th></tr>