View | Details | Raw Unified | Return to bug 193338
Collapse All | Expand All

(-)/usr/src/sys/kern/vfs_mountroot.c (working copy) (-1 / +27 lines)
Lines 930-941 Link Here
930
void
930
void
931
vfs_mountroot(void)
931
vfs_mountroot(void)
932
{
932
{
933
       struct mount *mp;
933
       struct mount *mp, *mp_prev;
934
       struct sbuf *sb;
934
       struct sbuf *sb;
935
       struct thread *td;
935
       struct thread *td;
936
       time_t timebase;
936
       time_t timebase;
937
       int error;
937
       int error;
938
       char *latest_mount;
939
       latest_mount="";
940
938
       td = curthread;
941
       td = curthread;
939
       vfs_mountroot_wait();
942
       vfs_mountroot_wait();
Lines 973-978 Link Here
973
                       timebase = mp->mnt_time;
976
                       timebase = mp->mnt_time;
974
               mp = TAILQ_NEXT(mp, mnt_list);
977
               mp = TAILQ_NEXT(mp, mnt_list);
975
       }
978
       }
979
980
       /*
981
        * Change mnt_stat.fmntonname to apropriate value
982
        * skipping /dev, current root, and previous root.
983
        */
984
       mp = TAILQ_FIRST(&mountlist);
985
       if ((mp = TAILQ_NEXT(mp, mnt_list)) != NULL) {
986
               mp_prev = mp;
987
               if ((mp = TAILQ_NEXT(mp, mnt_list)) != NULL)
988
                       while (mp != NULL) {
989
                               if (mp->mnt_time != 0){
990
                                   latest_mount="";
991
                                   strlcpy(latest_mount,
992
                                       mp_prev->mnt_stat.f_mntonname, MNAMELEN);
993
                                   strlcat(latest_mount,
994
                                       mp->mnt_stat.f_mntonname, MNAMELEN);
995
                                   strlcpy(mp->mnt_stat.f_mntonname,
996
                                       latest_mount, MNAMELEN);
997
                               }
998
                               mp_prev = mp;
999
                               mp = TAILQ_NEXT (mp, mnt_list);
1000
                       }
1001
       }
976
       mtx_unlock(&mountlist_mtx);
1002
       mtx_unlock(&mountlist_mtx);
977
       inittodr(timebase);
1003
       inittodr(timebase);

Return to bug 193338