diff --git a/libbb/find_root_device.c b/libbb/find_root_device.c
index edfd708..f8f6846 100644
--- a/libbb/find_root_device.c
+++ b/libbb/find_root_device.c
@@ -1,10 +1,9 @@
 /* vi: set sw=4 ts=4: */
 /*
- * Utility routines.
+ * Copyright (C) 2000,2001 by Lineo, inc.
+ * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org>
  *
- * Copyright (C) tons of folks.  Tracking down who wrote what
- * isn't something I'm going to worry about...  If you wrote something
- * here, please feel free to acknowledge your work.
+ * Patched by a bunch of people.  Feel free to acknowledge your work.
  *
  * 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
@@ -20,9 +19,6 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  *
- * Based in part on code from sash, Copyright (c) 1999 by David I. Bell 
- * Permission has been granted to redistribute this code under the GPL.
- *
  */
 
 #include <stdio.h>
@@ -38,45 +34,42 @@
 	DIR *dir;
 	struct dirent *entry;
 	struct stat statBuf, rootStat;
-	char *fileName;
+	char *fileName = NULL;
 	dev_t dev;
 
-	if (stat("/", &rootStat) != 0) {
+	if (stat("/", &rootStat) != 0) 
 		perror_msg("could not stat '/'");
-		return NULL;
-	}
-	if ((dev = rootStat.st_rdev)==0) dev=rootStat.st_dev;
+	else {
+		if ((dev = rootStat.st_rdev)==0) 
+			dev=rootStat.st_dev;
 
-	dir = opendir("/dev");
-	if (!dir) {
-		perror_msg("could not open '/dev'");
-		goto fallback;
-	}
+		dir = opendir("/dev");
+		if (!dir) 
+			perror_msg("could not open '/dev'");
+		else {
+			while((entry = readdir(dir)) != NULL) {
 
-	while((entry = readdir(dir)) != NULL) {
+				/* Must skip ".." since that is "/", and so we 
+				 * would get a false positive on ".."  */
+				if (strcmp(entry->d_name, "..") == 0)
+					continue;
 
-		/* Must skip ".." since that is "/", and so we 
-		 * would get a false positive on ".."  */
-		if (strcmp(entry->d_name, "..") == 0)
-			continue;
+				fileName = concat_path_file("/dev", entry->d_name);
 
-		fileName = concat_path_file("/dev/", entry->d_name);
-
-		/* Some char devices have the same dev_t as block
-		 * devices, so make sure this is a block device */
-		if (stat(fileName, &statBuf) == 0 && 
-				S_ISBLK(statBuf.st_mode)!=0 &&
-				statBuf.st_rdev == dev) {
-			return fileName; 
+				/* Some char devices have the same dev_t as block
+				 * devices, so make sure this is a block device */
+				if (stat(fileName, &statBuf) == 0 && 
+						S_ISBLK(statBuf.st_mode)!=0 &&
+						statBuf.st_rdev == dev) 
+					break;
+				free(fileName);
+				fileName=NULL;
+			}
+			closedir(dir);
 		}
-		free(fileName);
 	}
-	closedir(dir);
-
-fallback:
-	/* don't use stack space, caller expects to free() result */
-	fileName=xmalloc(20);
-	sprintf(fileName,"(rdev %u)",(unsigned int) rootStat.st_rdev);
+	if(fileName==NULL)
+		fileName=xstrdup("/dev/root");
 	return fileName;
 }
 
