Files
applets
archival
console-tools
coreutils
debian
docs
editors
examples
findutils
include
init
libbb
miscutils
modutils
networking
procps
scripts
shell
sysklogd
tests
util-linux
dmesg.c
fbset.c
fdflush.c
freeramdisk.c
fsck_minix.c
getopt.c
mkfs_minix.c
mkswap.c
more.c
mount.c
nfsmount.c
nfsmount.h
pivot_root.c
rdate.c
swaponoff.c
umount.c
.cvsignore
.indent.pro
AUTHORS
Changelog
Config.h
INSTALL
LICENSE
Makefile
README
TODO
adjtimex.c
applets.c
applets.h
ar.c
ash.c
basename.c
busybox.c
busybox.h
busybox.mkll
busybox.sh
busybox.spec
cat.c
chgrp.c
chmod.c
chown.c
chroot.c
chvt.c
clear.c
cmdedit.c
cmdedit.h
cmp.c
cp.c
cpio.c
cut.c
date.c
dc.c
dd.c
deallocvt.c
df.c
dirname.c
dmesg.c
dos2unix.c
dpkg.c
dpkg_deb.c
du.c
dumpkmap.c
dutmp.c
echo.c
env.c
expr.c
fbset.c
fdflush.c
find.c
free.c
freeramdisk.c
fsck_minix.c
getopt.c
grep.c
gunzip.c
gzip.c
halt.c
head.c
hostid.c
hostname.c
hush.c
id.c
ifconfig.c
init.c
insmod.c
install.sh
kill.c
klogd.c
lash.c
length.c
ln.c
loadacm.c
loadfont.c
loadkmap.c
logger.c
logname.c
logread.c
ls.c
lsmod.c
makedevs.c
md5sum.c
mk_loop_h.sh
mkdir.c
mkfifo.c
mkfs_minix.c
mknod.c
mkswap.c
mktemp.c
more.c
mount.c
msh.c
mt.c
mv.c
nc.c
nfsmount.c
nfsmount.h
nslookup.c
ping.c
pivot_root.c
poweroff.c
printf.c
pristine_setup.sh
ps.c
pwd.c
rdate.c
readlink.c
reboot.c
renice.c
reset.c
rm.c
rmdir.c
rmmod.c
route.c
rpm2cpio.c
sed.c
setkeycodes.c
sh.c
sleep.c
sort.c
stty.c
swaponoff.c
sync.c
syslogd.c
tail.c
tar.c
tee.c
telnet.c
test.c
tftp.c
touch.c
tr.c
traceroute.c
true_false.c
tty.c
umount.c
uname.c
uniq.c
unix2dos.c
update.c
uptime.c
usage.c
usage.h
usleep.c
uudecode.c
uuencode.c
vi.c
watchdog.c
wc.c
wget.c
which.c
whoami.c
xargs.c
yes.c
busybox/util-linux/pivot_root.c
Eric Andersen e76c3b08e1 A number of cleanups. Now compiles with libc5, glibc, and uClibc. Fix a few
shadowed variables.  Move (almost) all syscalls to libbb/syscalls.c, so I can
handle them sanely and all at once.
 -Erik
2001-04-05 03:14:39 +00:00

36 lines
669 B
C

/* vi: set sw=4 ts=4: */
/*
* pivot_root.c - Change root file system. Based on util-linux 2.10s
*
* busyboxed by Evin Robertson
* pivot_root syscall stubbed by Erik Andersen, so it will compile
* regardless of the kernel being used.
*/
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include "busybox.h"
extern int pivot_root(const char * new_root,const char * put_old);
int pivot_root_main(int argc, char **argv)
{
if (argc != 3)
show_usage();
if (pivot_root(argv[1],argv[2]) < 0)
perror_msg_and_die("pivot_root");
return EXIT_SUCCESS;
}
/*
Local Variables:
c-file-style: "linux"
c-basic-offset: 4
tab-width: 4
End:
*/