/illumos-gate/usr/src/uts/common/sys/ |
H A D | pathname.h | 60 typedef struct pathname { struct 69 extern void pn_alloc(struct pathname *); argument 70 extern void pn_alloc_sz(struct pathname *, size_t); 71 extern int pn_get(const char *, enum uio_seg, struct pathname *); 72 extern int pn_get_buf(const char *, enum uio_seg, struct pathname *, 74 extern int pn_set(struct pathname *, const char *); 75 extern int pn_insert(struct pathname *, struct pathname *, size_t); 76 extern int pn_getsymlink(vnode_t *, struct pathname *, cred_t *); 77 extern int pn_getcomponent(struct pathname *, char *); 78 extern void pn_setlast(struct pathname *); [all …]
|
/illumos-gate/usr/src/contrib/ast/src/lib/libcmd/ |
H A D | dirname.c | 66 static void l_dirname(register Sfio_t *outfile, register const char *pathname) in l_dirname() argument 70 for(last=pathname; *last; last++); in l_dirname() 72 while(last>pathname && *--last=='/'); in l_dirname() 74 for(;last>pathname && *last!='/';last--); in l_dirname() 75 if(last==pathname) in l_dirname() 78 if(*pathname!='/') in l_dirname() 79 last = pathname = "."; in l_dirname() 84 for(;*last=='/' && last > pathname; last--); in l_dirname() 87 if(last!=pathname && pathname[0]=='/' && pathname[1]=='/') in l_dirname() 89 while(pathname[2]=='/' && pathname<last) in l_dirname() [all …]
|
/illumos-gate/usr/src/tools/cscope-fast/ |
H A D | compath.c | 48 compath(char *pathname) in compath() argument 61 if (strchr(pathname, '/') == 0) in compath() 62 return (pathname); in compath() 68 for (lastchar = pathname + 1; *lastchar != '\0'; lastchar++) in compath() 94 for (lastchar = pathname + 1; *lastchar != '\0'; lastchar++) in compath() 96 ((lastchar - 1 == pathname) || (*(lastchar - 2) == '/'))) { in compath() 113 for (lastchar = pathname + 1; *lastchar != '\0'; lastchar++) in compath() 114 if ((lastchar != pathname) && (*lastchar == '/') && in compath() 123 while ((nextchar != pathname) && in compath() 165 if ((sofar + 1 != pathname) && (*sofar == '/')) in compath() [all …]
|
/illumos-gate/usr/src/lib/libc/port/gen/ |
H A D | getcwd.c | 46 getcwd(char *pathname, size_t size) in getcwd() argument 50 if (size == 0 && pathname == NULL) { in getcwd() 68 if ((pathname = reallocf(pathname, size)) == NULL) { in getcwd() 72 if (syscall(SYS_getcwd, pathname, size) == 0) { in getcwd() 79 ret = realloc(pathname, strlen(pathname) + 1); in getcwd() 81 return (pathname); in getcwd() 89 free(pathname); in getcwd() 98 if (pathname == NULL) { in getcwd() 99 if ((pathname = malloc(size)) == NULL) { in getcwd() 106 if (syscall(SYS_getcwd, pathname, size) == 0) in getcwd() [all …]
|
H A D | isaexec.c | 52 char *pathname; in isaexec() local 91 if ((pathname = malloc(len)) == NULL) { in isaexec() 100 (void) strcpy(pathname, execname); in isaexec() 101 if ((str = strrchr(pathname, '/')) != NULL) { in isaexec() 103 fname = execname + (str - pathname); in isaexec() 106 *pathname = '\0'; in isaexec() 108 len = strlen(pathname); in isaexec() 119 (void) strcpy(pathname + len, str); in isaexec() 120 (void) strcat(pathname + len, "/"); in isaexec() 121 (void) strcat(pathname + len, fname); in isaexec() [all …]
|
H A D | catopen.c | 93 char pathname[PATH_MAX + 1]; in process_nls_path() local 158 s = replace_nls_option(s, name, pathname, locale, in process_nls_path() 161 p = file_open(pathname, UNSAFE_F); in process_nls_path() 196 t = pathname; in process_nls_path() 201 while (*s && t < pathname + PATH_MAX) in process_nls_path() 204 while (*s && t < pathname + PATH_MAX) in process_nls_path() 207 while (*s && t < pathname + PATH_MAX) in process_nls_path() 210 return (file_open(pathname, SAFE_F)); in process_nls_path() 219 replace_nls_option(char *s, char *name, char *pathname, char *locale, in replace_nls_option() argument 224 t = pathname; in replace_nls_option() [all …]
|
H A D | getwd.c | 37 getwd(char *pathname) in getwd() argument 46 if ((c = getcwd(pathname, val)) == NULL) { in getwd() 48 (void) strcpy(pathname, in getwd() 51 (void) strcpy(pathname, "getwd: buffer too small"); in getwd() 53 (void) strcpy(pathname, "getwd: failure occurred"); in getwd()
|
/illumos-gate/usr/src/contrib/ast/src/lib/libast/comp/ |
H A D | dirname.c | 33 extern char *dirname(register char *pathname) in dirname() argument 37 for(last=pathname; *last; last++); in dirname() 39 while(last>pathname && *--last=='/'); in dirname() 41 for(;last>pathname && *last!='/';last--); in dirname() 42 if(last==pathname) in dirname() 54 for(;*last=='/' && last > pathname; last--); in dirname() 56 if(last==pathname && *pathname=='/' && pathname[1]=='/') in dirname() 60 return(pathname); in dirname()
|
/illumos-gate/usr/src/psm/promif/ieee1275/common/ |
H A D | prom_path.c | 59 prom_pathname(char *pathname) in prom_pathname() argument 63 char *to = pathname; in prom_pathname() 74 if ((uintptr_t)pathname > (uint32_t)-1) { in prom_pathname() 75 opathname = pathname; in prom_pathname() 76 pathname = promplat_alloc(OBP_MAXPATHLEN); in prom_pathname() 77 if (pathname == NULL) { in prom_pathname() 80 (void) prom_strcpy(pathname, opathname); in prom_pathname() 81 to = pathname; in prom_pathname() 87 promplat_free(pathname, OBP_MAXPATHLEN); in prom_pathname() 111 (void) prom_strcpy(opathname, pathname); in prom_pathname() [all …]
|
/illumos-gate/usr/src/uts/common/fs/ |
H A D | pathname.c | 73 pn_alloc(struct pathname *pnp) in pn_alloc() 78 pn_alloc_sz(struct pathname *pnp, size_t sz) in pn_alloc_sz() 89 pn_free(struct pathname *pnp) in pn_free() 104 pn_get_buf(const char *str, enum uio_seg seg, struct pathname *pnp, in pn_get_buf() 125 pn_get(const char *str, enum uio_seg seg, struct pathname *pnp) in pn_get() 143 pn_set(struct pathname *pnp, const char *path) in pn_set() 165 pn_insert(struct pathname *pnp, struct pathname *sympnp, size_t complen) in pn_insert() 201 pn_getsymlink(vnode_t *vp, struct pathname *pnp, cred_t *crp) in pn_getsymlink() 231 pn_getcomponent(struct pathname *pnp, char *component) in pn_getcomponent() 263 pn_skipslash(struct pathname *pnp) in pn_skipslash() [all …]
|
/illumos-gate/usr/src/cmd/sendmail/src/ |
H A D | mci.c | 1104 mci_traverse_persistent(action, pathname) 1106 char *pathname; variable 1112 if (pathname == NULL) 1113 pathname = HostStatDir; 1114 if (pathname == NULL) 1118 sm_dprintf("mci_traverse: pathname is %s\n", pathname); 1120 ret = stat(pathname, &statbuf); 1125 pathname, sm_errstring(errno)); 1139 if ((d = opendir(pathname)) == NULL) 1143 pathname, sm_errstring(errno)); [all …]
|
/illumos-gate/usr/src/lib/cfgadm_plugins/fp/common/ |
H A D | cfga_cs.c | 346 char pathname[MAXPATHLEN]; in lun_unconf() local 359 (void) strlcpy(pathname, xport_phys, MAXPATHLEN); in lun_unconf() 360 if ((ptr = strrchr(pathname, ':')) != NULL) { in lun_unconf() 385 strcat(pathname, ptr); in lun_unconf() 392 if ((ptr = strrchr(pathname, '@')) == NULL) { in lun_unconf() 395 pathname, 0); in lun_unconf() 401 sprintf(&pathname[strlen(pathname)], "@w%s,%x", in lun_unconf() 403 ptr = pathname; in lun_unconf() 504 char *vhci_path_ptr, *pathname_ptr, pathname[MAXPATHLEN]; in is_xport_phys_in_pathlist() local 540 (void) strlcpy(pathname, xport_phys, MAXPATHLEN); in is_xport_phys_in_pathlist() [all …]
|
/illumos-gate/usr/src/cmd/srchtxt/ |
H A D | srchtxt.c | 96 char pathname[128]; in main() local 135 (void) strcpy(pathname, P_locale); in main() 136 (void) strcpy(&pathname[L_locale - 1], locale); in main() 137 (void) strcat(pathname, MESSAGES); in main() 138 len = strlen(pathname); in main() 160 cp = pathname; in main() 179 if ((dirp = opendir(pathname)) == NULL) { in main() 181 cmdname, pathname, syserr()); in main() 188 if ((addr = attach(pathname, len, &fd, &size)) == -1) { in main() 190 "%s: ERROR: failed to access message file '%s'\n", cmdname, pathname); in main()
|
/illumos-gate/usr/src/test/test-runner/cmd/ |
H A D | run | 171 def __init__(self, pathname, identifier=None, outputdir=None, 173 self.pathname = pathname 191 ''' % (self.pathname, self.identifier, self.outputdir, self.timeout, self.user) 255 privcmd = self.update_cmd_privs(self.pathname, self.user) 310 msga = 'Test (%s): %s%s ' % (self.identifier, self.pathname, user) 312 msga = 'Test: %s%s ' % (self.pathname, user) 359 def __init__(self, pathname, 362 super(Test, self).__init__(pathname, **kwargs) 384 ''' % (self.pathname, self.identifier, self.outputdir, self.timeout, self.user, 392 files = [self.pre, self.pathname, self.post] [all …]
|
/illumos-gate/usr/src/ucblib/libucb/port/gen/ |
H A D | getwd.c | 37 getwd(char *pathname) in getwd() argument 45 if ((c = getcwd(pathname, val)) == NULL) { in getwd() 47 (void) strcpy(pathname, in getwd() 50 (void) strcpy(pathname, "getwd: buffer too small"); in getwd() 52 (void) strcpy(pathname, "getwd: failure occurred"); in getwd()
|
/illumos-gate/usr/src/cmd/ptools/pldd/ |
H A D | pldd.c | 151 char pathname[PATH_MAX]; in show_map() local 173 if ((len = resolvepath(object_name, pathname, sizeof (pathname))) > 0) in show_map() 174 pathname[len] = '\0'; in show_map() 176 (void) strncpy(pathname, object_name, sizeof (pathname)); in show_map() 178 (void) printf("%s\n", pathname); in show_map()
|
/illumos-gate/usr/src/lib/cfgadm_plugins/usb/common/ |
H A D | cfga_configfile.c | 48 char *pathname; member 548 user_rec->pathname = in usb_get_conf_rec() 660 } else if (user_rec->pathname) { in usb_cmp_rec() 661 if (cfg_rec->pathname) { in usb_cmp_rec() 672 ustr = strrchr(user_rec->pathname, '/'); in usb_cmp_rec() 673 cstr = strrchr(cfg_rec->pathname, '/'); in usb_cmp_rec() 674 path = (strncmp(cfg_rec->pathname, in usb_cmp_rec() 675 user_rec->pathname, in usb_cmp_rec() 676 MAX(ustr - user_rec->pathname, in usb_cmp_rec() 677 cstr - cfg_rec->pathname)) == 0); in usb_cmp_rec() [all …]
|
/illumos-gate/usr/src/cmd/fs.d/nfs/nfslog/ |
H A D | nfslog_trans.c | 86 char *pathname; member 182 if (strcmp(pte->pathname, entry->pathname) == 0) { in insert_te() 254 if (pte->pathname) free(pte->pathname); in remove_te() 570 newte->pathname = nfslog_get_path(&args->ra_fhandle, in trans_read() 573 newte->pathname = strdup(path1); in trans_read() 640 newte->pathname = nfslog_get_path(&args->waargs_fhandle, in trans_write() 643 newte->pathname = strdup(path1); in trans_write() 722 newte->pathname = nfslog_get_path(&args->saa_fh, NULL, in trans_setattr() 725 newte->pathname = strdup(path1); in trans_setattr() 777 newte->pathname = in trans_create() [all …]
|
/illumos-gate/usr/src/cmd/fs.d/nfs/lib/ |
H A D | ref_subr.c | 212 make_pathname4(char *path, pathname4 *pathname) in make_pathname4() argument 217 if (pathname == NULL) in make_pathname4() 221 pathname->pathname4_val = NULL; in make_pathname4() 222 pathname->pathname4_len = 0; in make_pathname4() 228 pathname->pathname4_val = NULL; in make_pathname4() 229 pathname->pathname4_len = 0; in make_pathname4() 234 pathname->pathname4_val = NULL; in make_pathname4() 235 pathname->pathname4_len = 0; in make_pathname4() 242 pathname->pathname4_val = comp4; in make_pathname4() 243 pathname->pathname4_len = ncomp; in make_pathname4()
|
/illumos-gate/usr/src/cmd/swap/ |
H A D | swap.c | 103 char *pathname = NULL; in main() local 140 pathname = optarg; in main() 150 ret = delete(pathname, s_offset); in main() 173 pathname = optarg; in main() 245 if (dm_inuse(pathname, &msg, DM_WHO_SWAP, &error) || in main() 257 if ((ret = valid(pathname, in main() 259 ret = add(pathname, s_offset, length, flag); in main() 664 valid(char *pathname, off_t offset, off_t length) in valid() argument 670 if (stat64(pathname, &f) < 0 || statvfs64(pathname, &fs) < 0) { in valid() 671 (void) perror(pathname); in valid() [all …]
|
/illumos-gate/usr/src/lib/libtecla/common/ |
H A D | pathutil.c | 369 int _pu_path_is_dir(const char *pathname) in _pu_path_is_dir() argument 375 if(stat(pathname, &statbuf) < 0) in _pu_path_is_dir() 392 int _pu_path_is_file(const char *pathname) in _pu_path_is_file() argument 398 if(stat(pathname, &statbuf) < 0) in _pu_path_is_file() 415 int _pu_path_is_exe(const char *pathname) in _pu_path_is_exe() argument 421 if(stat(pathname, &statbuf) < 0) in _pu_path_is_exe() 428 access(pathname, X_OK) == 0; in _pu_path_is_exe() 533 int _pu_file_exists(const char *pathname) in _pu_file_exists() argument 536 return stat(pathname, &statbuf) == 0; in _pu_file_exists()
|
/illumos-gate/usr/src/cmd/abi/appcert/scripts/ |
H A D | abi_index.pl | 80 my $pathname = ''; 90 $pathname = $'; 110 next unless ($pathname =~ m,\.so,); 111 next unless ($pathname =~ m,/lib,); 112 next unless ($pathname =~ m,/lib[^/]*\.so\b,); 115 $pathname = trim($pathname); 117 filter($pathname, $link, $pkgs);
|
/illumos-gate/usr/src/lib/libpcp/common/ |
H A D | pcp_utils.c | 80 char *pathname = strdup(dev_path); in get_vldc_svc_name() local 83 if (NULL == pathname) in get_vldc_svc_name() 86 devname = basename(pathname); in get_vldc_svc_name() 118 free(pathname); in get_vldc_svc_name() 134 char *pathname = strdup(dev_path); in get_glvc_svc_name() local 138 if (NULL == pathname) in get_glvc_svc_name() 141 devname = basename(pathname); in get_glvc_svc_name() 170 free(pathname); in get_glvc_svc_name()
|
/illumos-gate/usr/src/uts/common/io/usb/usba/ |
H A D | usba_devdb.c | 203 cfgrec->pathname = in usba_devdb_get_conf_rec() 307 if (rec->pathname) { in usba_devdb_free_rec() 308 kobj_free_string(rec->pathname, strlen(rec->pathname) + 1); in usba_devdb_free_rec() 452 u1->pathname, u2->pathname)); in usba_devdb_compare() 458 u1->pathname, u2->pathname)); in usba_devdb_compare() 576 char *pathname) in usba_devdb_get_user_preferences() argument 592 req_rec->pathname = pathname; in usba_devdb_get_user_preferences() 605 req_rec->serialno = req_rec->pathname = NULL; in usba_devdb_get_user_preferences()
|
/illumos-gate/usr/src/lib/libresolv2/common/dst/ |
H A D | support.c | 304 char pathname[PATH_MAX]; in dst_s_fopen() local 306 if (strlen(filename) + strlen(dst_path) >= sizeof(pathname)) in dst_s_fopen() 310 strcpy(pathname, dst_path); in dst_s_fopen() 311 strcat(pathname, filename); in dst_s_fopen() 313 strcpy(pathname, filename); in dst_s_fopen() 315 fp = fopen(pathname, mode); in dst_s_fopen() 317 chmod(pathname, perm); in dst_s_fopen()
|