new_path
char *new_path;
new_path = s_calloc(1, new_path_len);
(void) snprintf(new_path, new_path_len, "/platform/i86pc/%s",
if (stat(new_path, &sb) == 0) {
BAM_DPRINTF(("%s: expanded path: %s\n", fcn, new_path));
return (new_path);
(void) snprintf(new_path, new_path_len, "%s -k",
BAM_DPRINTF(("%s: expanded path: %s\n", fcn, new_path));
return (new_path);
(void) snprintf(new_path, new_path_len, "/platform/i86pc/%s/unix",
if (stat(new_path, &sb) == 0) {
(void) snprintf(new_path, new_path_len,
BAM_DPRINTF(("%s: expanded path: %s\n", fcn, new_path));
return (new_path);
free(new_path);
char *new_path;
new_path = NULL;
new_path = expand_path(path);
if (new_path == NULL) {
new_path = path;
new_str_len = strlen(new_path) +
new_path, ZFS_BOOT);
new_path));
signbuf, new_path, NULL, NULL, NULL);
new_str_len = strlen(new_path) + strlen(old_args) + 2;
(void) snprintf(new_arg, new_str_len, "%s %s", new_path,
free(new_path);
char new_path[PATH_MAX + 1];
(void) strcpy(new_path, current_dir);
(void) strcat(new_path, "/");
(void) strcat(new_path, fp);
"path = %s\n", new_path);
recurse_dev_re(new_path, slash + 1, rd);
(*(rd->fcn))(new_path, rd->data);
char *new_path;
new_path = s_malloc(strlen(current_dir) +
(void) strcpy(new_path, current_dir);
(void) strcat(new_path, "/");
(void) strcat(new_path, fp);
enumerate_recurse(new_path, slash + 1,
create_cached_numeral(new_path, setp,
free(new_path);
pathpt new_path;
new_path= (pathpt)calloc((unsigned)(position+2), sizeof(pathcellt));
memcpy((char *)new_path,(char *)(*pointer), size*sizeof(pathcellt));
*pointer= new_path;};
if (realpath(path, new_path) == NULL) {
len = strlen(new_path);
(strcmp(new_path, "/devices") == 0)) {
} else if (strncmp(new_path, "/devices/", plen + 1)) {
opts.o_devices_path = new_path + plen;
static char new_path[MAXPATHLEN];
import_checkpointed_state(char *target, nvlist_t *cfg, char **new_path)
if (new_path != NULL && path_start != NULL)
(void) asprintf(new_path, "%s%s", bogus_name, path_start);
test_if_blk(char *new_path, dev_t raw_dev)
if (stat64(new_path, &buf) != 0)
test_if_raw(char *new_path, dev_t blk_dev)
if (stat64(new_path, &buf) != 0)
char *new_path;
if ((new_path = malloc(strlen(cp))) == NULL)
(void) strcpy(new_path, cp); /* save first part of it */
(void) strcat(new_path, dp); /* copy, skipping the 'r' */
if (test_if_blk(new_path, dat->st_rdev))
return (new_path);
free(new_path);
if ((new_path = malloc(strlen(cp))) == NULL)
(void) strcpy(new_path, cp); /* save first part of it */
(void) strcat(new_path, dp); /* copy, skipping the 'r' */
if (test_if_blk(new_path, dat->st_rdev))
return (new_path);
free(new_path);
char *new_path;
if ((new_path = malloc(strlen(cp)+2)) == NULL)
(void) strcpy(new_path, cp); /* save first part of it */
(void) strcat(new_path, "r"); /* insert an 'r' */
(void) strcat(new_path, dp); /* copy the rest */
if (test_if_raw(new_path, dat->st_rdev))
return (new_path);
free(new_path);
if ((new_path = malloc(strlen(cp)+2)) == NULL)
(void) strcpy(new_path, cp); /* save first part */
(void) strcat(new_path, "r"); /* insert an 'r' */
(void) strcat(new_path, dp); /* copy the rest */
if (test_if_raw(new_path, dat->st_rdev))
return (new_path);
free(new_path);
char *new_path;
if ((new_path = malloc(strlen(cp))) == NULL) {
(void) strncpy(new_path, cp, dp - cp);
(void) strcpy(new_path + (dp - cp), dp + 1);
if (test_if_blk(new_path, raw_dev)) {
return (new_path);
free(new_path);
char *new_path;
if ((new_path = malloc(strlen(cp)+2)) == NULL) {
(void) strncpy(new_path, cp, dp - cp);
new_path[dp - cp] = 'r';
(void) strcpy(new_path + (dp - cp) + 1, dp);
if (test_if_raw(new_path, blk_dev)) {
return (new_path);
free(new_path);
static path_t *new_path(controller_t *cp, disk_t *diskp,
if (new_path(cp, diskp, phci_node,
char *p, *spath, *op, *new_path;
new_path = kmem_zalloc(MAXPATHLEN, KM_SLEEP);
(void) strlcpy(new_path, p, MAXPATHLEN);
i = strlen(new_path);
new_path[i] = *op;
new_path[i] = '\0';
svp->sv_pathlen = strlen(new_path) + 1;
bcopy(new_path, svp->sv_path, svp->sv_pathlen);
kmem_free(new_path, MAXPATHLEN);
char *new_path;
new_rsp->rst_devpath = new_path = i_ddi_strdup(devpath, KM_SLEEP);
kmem_free(new_path, strlen(new_path) + 1);
i_convert_boot_device_name(char *cur_path, char *new_path, size_t *len)
if (new_path != NULL) {
(void) snprintf(new_path, *len, "%s", cur_path);
return (new_path);
new_path = kmem_alloc(*len, KM_SLEEP);
(void) snprintf(new_path, *len, "%s", cur_path);
return (new_path);
i_convert_boot_device_name(char *cur_path, char *new_path, size_t *len)
ASSERT(new_path == NULL || *len >= MAXPATHLEN);
if (new_path == NULL) {
new_path = kmem_alloc(*len, KM_SLEEP);
rval = i_devname_to_promname(cur_path, new_path, *len);
(void) snprintf(new_path + strlen(new_path),
*len - strlen(new_path), "%s", ptr);
(void) snprintf(new_path, *len, "%s", cur_path);
return (new_path);