diff options
Diffstat (limited to 'mount.c')
-rw-r--r-- | mount.c | 13 |
1 files changed, 2 insertions, 11 deletions
@@ -45,7 +45,6 @@ | |||
45 | #include <mntent.h> | 45 | #include <mntent.h> |
46 | #include <sys/mount.h> | 46 | #include <sys/mount.h> |
47 | #include <ctype.h> | 47 | #include <ctype.h> |
48 | #include <fstab.h> | ||
49 | #if defined BB_FEATURE_USE_DEVPS_PATCH | 48 | #if defined BB_FEATURE_USE_DEVPS_PATCH |
50 | #include <linux/devmtab.h> | 49 | #include <linux/devmtab.h> |
51 | #endif | 50 | #endif |
@@ -321,9 +320,6 @@ extern int mount_main(int argc, char **argv) | |||
321 | int useMtab = TRUE; | 320 | int useMtab = TRUE; |
322 | int i; | 321 | int i; |
323 | 322 | ||
324 | /* Only compiled in if BB_MTAB is not defined */ | ||
325 | whine_if_fstab_is_missing(); | ||
326 | |||
327 | #if defined BB_FEATURE_USE_DEVPS_PATCH | 323 | #if defined BB_FEATURE_USE_DEVPS_PATCH |
328 | if (argc == 1) { | 324 | if (argc == 1) { |
329 | int fd, i, numfilesystems; | 325 | int fd, i, numfilesystems; |
@@ -364,14 +360,9 @@ extern int mount_main(int argc, char **argv) | |||
364 | struct mntent *m; | 360 | struct mntent *m; |
365 | 361 | ||
366 | while ((m = getmntent(mountTable)) != 0) { | 362 | while ((m = getmntent(mountTable)) != 0) { |
367 | struct fstab *fstabItem; | ||
368 | char *blockDevice = m->mnt_fsname; | 363 | char *blockDevice = m->mnt_fsname; |
369 | |||
370 | /* Note that if /etc/fstab is missing, libc can't fix up /dev/root for us */ | ||
371 | if (strcmp(blockDevice, "/dev/root") == 0) { | 364 | if (strcmp(blockDevice, "/dev/root") == 0) { |
372 | fstabItem = getfsfile("/"); | 365 | find_real_root_device_name( blockDevice); |
373 | if (fstabItem != NULL) | ||
374 | blockDevice = fstabItem->fs_spec; | ||
375 | } | 366 | } |
376 | printf("%s on %s type %s (%s)\n", blockDevice, m->mnt_dir, | 367 | printf("%s on %s type %s (%s)\n", blockDevice, m->mnt_dir, |
377 | m->mnt_type, m->mnt_opts); | 368 | m->mnt_type, m->mnt_opts); |
@@ -445,7 +436,7 @@ extern int mount_main(int argc, char **argv) | |||
445 | FILE *f = setmntent("/etc/fstab", "r"); | 436 | FILE *f = setmntent("/etc/fstab", "r"); |
446 | 437 | ||
447 | if (f == NULL) | 438 | if (f == NULL) |
448 | fatalError( "\nCannot ream /etc/fstab: %s\n", strerror (errno)); | 439 | fatalError( "\nCannot read /etc/fstab: %s\n", strerror (errno)); |
449 | 440 | ||
450 | while ((m = getmntent(f)) != NULL) { | 441 | while ((m = getmntent(f)) != NULL) { |
451 | // If the file system isn't noauto, | 442 | // If the file system isn't noauto, |