applets
arch
archival
console-tools
coreutils
debianutils
docs
e2fsprogs
editors
examples
findutils
include
init
libbb
libpwdgrp
loginutils
mailutils
miscutils
modutils
networking
printutils
procps
runit
scripts
selinux
shell
sysklogd
testsuite
util-linux
volume_id
Config.src
Kbuild.src
acpid.c
blkid.c
dmesg.c
fbset.c
fdformat.c
fdisk.c
fdisk_aix.c
fdisk_osf.c
fdisk_sgi.c
fdisk_sun.c
findfs.c
flock.c
freeramdisk.c
fsck_minix.c
getopt.c
hexdump.c
hwclock.c
ipcrm.c
ipcs.c
losetup.c
lspci.c
lsusb.c
mdev.c
minix.h
mkfs_ext2.c
mkfs_ext2.txt
mkfs_ext2_test.sh
mkfs_minix.c
mkfs_reiser.c
mkfs_vfat.c
mkswap.c
more.c
mount.c
pivot_root.c
rdate.c
rdev.c
readprofile.c
rev.c
rtcwake.c
script.c
scriptreplay.c
setarch.c
swaponoff.c
switch_root.c
umount.c
.gitignore
.indent.pro
AUTHORS
Config.in
INSTALL
LICENSE
Makefile
Makefile.custom
Makefile.flags
Makefile.help
README
TEST_config_nommu
TEST_config_noprintf
TEST_config_rh9
TODO
TODO_unicode
25 lines
586 B
C
25 lines
586 B
C
/* vi: set sw=4 ts=4: */
|
|
/*
|
|
* rdev - print device node associated with a filesystem
|
|
*
|
|
* Copyright (c) 2008 Nuovation System Designs, LLC
|
|
* Grant Erickson <gerickson@nuovations.com>
|
|
*
|
|
* Licensed under GPLv2, see file LICENSE in this tarball for details.
|
|
*
|
|
*/
|
|
|
|
#include "libbb.h"
|
|
|
|
int rdev_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
|
int rdev_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
|
{
|
|
char const * const root_device = find_block_device("/");
|
|
|
|
if (root_device != NULL) {
|
|
printf("%s /\n", root_device);
|
|
return EXIT_SUCCESS;
|
|
}
|
|
return EXIT_FAILURE;
|
|
}
|