}
#endif
-static int find_root_dev(char *buf, int len)
+static int find_dev(const char *path, char *buf, int len)
{
DIR *d;
dev_t root;
struct stat s;
struct dirent *e;
- if (stat("/", &s))
+ if (stat(path, &s))
return -1;
if (!(d = opendir("/dev")))
return -1;
}
+static int find_root_dev(char *buf, int len)
+{
+ int err = find_dev("/", buf, len);
+ if (err)
+ err = find_dev("/rom", buf, len);
+
+ return err;
+}
+
static int test_fs_support(const char *name)
{
char line[128], *p;