Author: jh
Date: Fri Apr 16 07:02:28 2010
New Revision: 206698
URL: http://svn.freebsd.org/changeset/base/206698

Log:
  Revert r206560. The change doesn't work correctly in all cases with
  multiple devfs mounts.

Modified:
  head/sys/fs/devfs/devfs_devs.c
  head/sys/fs/devfs/devfs_int.h

Modified: head/sys/fs/devfs/devfs_devs.c
==============================================================================
--- head/sys/fs/devfs/devfs_devs.c      Fri Apr 16 06:49:12 2010        
(r206697)
+++ head/sys/fs/devfs/devfs_devs.c      Fri Apr 16 07:02:28 2010        
(r206698)
@@ -408,9 +408,6 @@ devfs_populate_loop(struct devfs_mount *
                        continue;
                KASSERT((cdp->cdp_flags & CDP_ACTIVE), ("Bogons, I tell ya'!"));
 
-               if (cdp->cdp_flags & CDP_INVALID)
-                       continue;
-
                if (dm->dm_idx <= cdp->cdp_maxdirent &&
                    cdp->cdp_dirents[dm->dm_idx] != NULL) {
                        de = cdp->cdp_dirents[dm->dm_idx];
@@ -428,8 +425,6 @@ devfs_populate_loop(struct devfs_mount *
                dd = dm->dm_rootdir;
                s = cdp->cdp_c.si_name;
                for (;;) {
-                       while (*s == '/')
-                               s++;
                        for (q = s; *q != '/' && *q != '\0'; q++)
                                continue;
                        if (*q != '/')
@@ -439,24 +434,6 @@ devfs_populate_loop(struct devfs_mount *
                                de = devfs_vmkdir(dm, s, q - s, dd, 0);
                        s = q + 1;
                        dd = de;
-                       if (dd->de_flags & (DE_DOT | DE_DOTDOT))
-                               break;
-               }
-
-               /*
-                * XXX: Ignore duplicate and empty device names.
-                * XXX: Currently there is no way to report the error to
-                * XXX: the make_dev(9) caller.
-                */
-               if (dd->de_dirent->d_type != DT_DIR ||
-                   dd->de_flags & (DE_DOT | DE_DOTDOT) || q - s < 1 ||
-                   devfs_find(dd, s, q - s) != NULL) {
-                       dev_lock();
-                       cdp->cdp_flags |= CDP_INVALID;
-                       dev_unlock();
-                       printf("%s: %s: invalid or duplicate device name\n",
-                           __func__, cdp->cdp_c.si_name);
-                       return (1);
                }
 
                de = devfs_newdirent(s, q - s);

Modified: head/sys/fs/devfs/devfs_int.h
==============================================================================
--- head/sys/fs/devfs/devfs_int.h       Fri Apr 16 06:49:12 2010        
(r206697)
+++ head/sys/fs/devfs/devfs_int.h       Fri Apr 16 07:02:28 2010        
(r206698)
@@ -55,7 +55,6 @@ struct cdev_priv {
        u_int                   cdp_flags;
 #define CDP_ACTIVE             (1 << 0)
 #define CDP_SCHED_DTR          (1 << 1)
-#define CDP_INVALID            (1 << 2)
 
        u_int                   cdp_inuse;
        u_int                   cdp_maxdirent;
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to