Lines Matching refs:cp
43 char *str, *cp;
51 cp = str;
54 if (strncmp(cp, "/dev/", 5) != 0)
56 cp += 5;
59 if (strncmp(cp, "dsk/", 4) == 0)
60 cp += 4;
66 if (cp[0] == 'm' && cp[1] == 'd') {
67 *(cp+2) = 0;
72 if (strncmp(cp, "rd/", 3) == 0) {
73 cp += 3;
74 if (cp[0] != 'c' || cp[2] != 'd' ||
75 !isdigit(cp[1]) || !isdigit(cp[3]))
77 *(cp+4) = 0;
82 if ((cp[0] == 'h' || cp[0] == 's') && (cp[1] == 'd')) {
83 cp += 2;
85 if (isdigit(*cp))
86 cp++;
88 if (!isalpha(*cp))
90 *(cp + 1) = 0;
96 if (strncmp(cp, "ide/", 4) == 0)
98 if (strncmp(cp, "scsi/", 5) == 0)
101 cp += len;
110 if (strncmp(cp, *hier, len) != 0)
112 cp += len;
113 while (*cp != '/' && *cp != 0) {
114 if (!isdigit(*cp))
116 cp++;
118 cp++;
120 *(cp - 1) = 0;
126 if (strncmp(cp, "discs/", 6) == 0)
128 else if (strncmp(cp, "disks/", 6) == 0)
131 cp += 6;
132 if (strncmp(cp, disk, 4) != 0)
134 cp += 4;
135 while (*cp != '/' && *cp != 0) {
136 if (!isdigit(*cp))
138 cp++;
140 *cp = 0;
153 char buf[256], *cp;
158 cp = strchr(buf, '\n');
159 if (cp)
160 *cp = 0;
161 cp = strchr(buf, '\t');
162 if (cp)
163 *cp = 0;