Lines Matching refs:dp
810 newdev(struct device *dp)
815 *np = *dp;
905 register struct device *dp;
909 for (dp = dtab; dp != 0; dp = dp->d_next) {
910 if ((num != dp->d_unit) || !eq(dev, dp->d_name))
912 if (dp->d_type != CONTROLLER && dp->d_type != MASTER) {
918 return (dp);
931 register struct device *dp, *dcp;
932 struct device rdev; /* only used if dp is NULL */
940 for (dp = dtab; dp != 0; dp = dp->d_next)
941 if (eq(dp->d_name, dev))
943 if (dp == 0) {
948 oldtype = dp->d_type;
949 dcp = dp->d_conn;
954 for (; dp != 0; dp = dp->d_next)
955 if (eq(dev, dp->d_name) && dp->d_unit == -1)
961 if (dp == 0) {
962 dp = &rdev;
963 init_dev(dp);
964 dp->d_unit = QUES;
965 dp->d_name = ns(dev);
966 dp->d_type = oldtype;
967 newdev(dp);
968 dp = curp;
979 dp->d_conn = dcp;
981 dp->d_conn = dconnect(dcp->d_name, QUES);
983 return (dp);
987 init_dev(struct device *dp)
990 dp->d_name = "OHNO!!!";
991 dp->d_type = DEVICE;
992 dp->d_conn = 0;
993 dp->d_vec = 0;
994 dp->d_addr = dp->d_pri = dp->d_flags = dp->d_dk = 0;
995 dp->d_slave = dp->d_drive = dp->d_unit = UNKNOWN;
998 dp->d_addr = UNKNOWN;
999 dp->d_mach = dp->d_bus = 0;
1002 dp->d_addrmod = 0;
1004 dp->d_init = 0;