Lines Matching refs:new_path

152 test_if_blk(char *new_path, dev_t raw_dev)
157 if (stat64(new_path, &buf) != 0)
173 test_if_raw(char *new_path, dev_t blk_dev)
178 if (stat64(new_path, &buf) != 0)
198 char *new_path;
205 if ((new_path = malloc(strlen(cp))) == NULL)
210 (void) strcpy(new_path, cp); /* save first part of it */
212 (void) strcat(new_path, dp); /* copy, skipping the 'r' */
214 if (test_if_blk(new_path, dat->st_rdev))
215 return (new_path);
217 free(new_path);
223 if ((new_path = malloc(strlen(cp))) == NULL)
228 (void) strcpy(new_path, cp); /* save first part of it */
230 (void) strcat(new_path, dp); /* copy, skipping the 'r' */
232 if (test_if_blk(new_path, dat->st_rdev))
233 return (new_path);
235 free(new_path);
251 char *new_path;
258 /* malloc path for new_path to hold raw */
259 if ((new_path = malloc(strlen(cp)+2)) == NULL)
264 (void) strcpy(new_path, cp); /* save first part of it */
266 (void) strcat(new_path, "r"); /* insert an 'r' */
267 (void) strcat(new_path, dp); /* copy the rest */
269 if (test_if_raw(new_path, dat->st_rdev))
270 return (new_path);
272 free(new_path);
277 /* malloc path for new_path to hold raw */
278 if ((new_path = malloc(strlen(cp)+2)) == NULL)
283 (void) strcpy(new_path, cp); /* save first part */
285 (void) strcat(new_path, "r"); /* insert an 'r' */
286 (void) strcat(new_path, dp); /* copy the rest */
288 if (test_if_raw(new_path, dat->st_rdev))
289 return (new_path);
291 free(new_path);
340 char *new_path;
393 if ((new_path = malloc(strlen(cp))) == NULL) {
397 (void) strncpy(new_path, cp, dp - cp);
400 (void) strcpy(new_path + (dp - cp), dp + 1);
402 if (test_if_blk(new_path, raw_dev)) {
405 return (new_path);
407 free(new_path);
422 char *new_path;
471 if ((new_path = malloc(strlen(cp)+2)) == NULL) {
475 (void) strncpy(new_path, cp, dp - cp);
477 new_path[dp - cp] = 'r';
478 (void) strcpy(new_path + (dp - cp) + 1, dp);
480 if (test_if_raw(new_path, blk_dev)) {
482 return (new_path);
484 free(new_path);