Home
last modified time | relevance | path

Searched refs:shp (Results 1 – 25 of 119) sorted by relevance

12345

/illumos-gate/usr/src/contrib/ast/src/cmd/ksh93/sh/
H A Dxec.c134 shp->fdstatus[i] = shp->fdstatus[1]; in iousepipe()
155 shp->fdstatus[n] = shp->fdstatus[1]; in iounpipe()
700 nr->root = shp->namespace?nv_dict(shp->namespace):shp->var_base; in set_instance()
896 shp->fdptrs[shp->coutpipe] = &shp->coutpipe; in sh_coexec()
956 if(shp->var_tree==shp->var_base) in enter_namespace()
1019 shp->oldexit=shp->exitval; in sh_exec()
1658 sh_copipe(shp,shp->outpipe=shp->cpipe,0); in sh_exec()
1660 shp->fdptrs[shp->cpipe[0]] = shp->cpipe; in sh_exec()
3661 shp->fdptrs[shp->cpipe[0]] = shp->cpipe; in coproc_init()
3666 shp->outpipe = shp->cpipe; in coproc_init()
[all …]
H A Dfault.c84 shp->winch++; in sh_fault()
88 if(shp->savesig) in sh_fault()
205 if(shp->bltinfun && shp->bltindata.notify) in sh_fault()
418 job_chldtrap(shp,shp->st.trapcom[SIGCHLD],1); in sh_chktrap()
461 shp->intrap++; in sh_trap()
490 shp->intrap--; in sh_trap()
518 shp->exitval |= (sig=shp->lastsig); in sh_exit()
537 if(!shp->subshell && (sig=sh_fork(shp,0,NIL(int*)))) in sh_exit()
613 (*shp->userinit)(shp, -1); in sh_done()
628 sh_freeup(shp); in sh_done()
[all …]
H A Dsubshell.c129 shp->fdstatus[fd] = shp->fdstatus[1]|IOCLEX; in sh_subtmpfile()
163 shp->fdstatus[1] = shp->fdstatus[fd]; in sh_subtmpfile()
184 Shell_t *shp = sp->shp; in sh_subfork() local
260 shp = sp->shp; in sh_assignok()
507 sp->shp = shp; in sh_subshell()
528 if(!shp->pwd) in sh_subshell()
574 sp->pwd = (shp->pwd?strdup(shp->pwd):0); in sh_subshell()
639 shp->oldexit = shp->exitval; in sh_subshell()
691 shp->fdstatus[fd] = (shp->fdstatus[1]|IOCLEX); in sh_subshell()
743 if(!shp->pwd || strcmp(sp->pwd,shp->pwd)) in sh_subshell()
[all …]
H A Dmain.c110 shp->st.filename = path_fullname(shp,stakptr(PATH_OFFSET)); in sh_source()
155 shp->fn_depth = shp->dot_depth = 0; in sh_main()
190 shp->options.v[i] &= ~shp->offoptions.v[i]; in sh_main()
224 sh_source(shp, iop, shp->gd->rcfile ? shp->gd->rcfile : sh_mactry(shp,(char*)e_bash_rc)); in sh_main()
280 av[shp->st.repl_index] = shp->st.repl_arg; in sh_main()
305 shp->st.filename = path_fullname(shp,name); in sh_main()
318 shp->st.filename = path_fullname(shp,sp); in sh_main()
339 shp->readscript = shp->shname; in sh_main()
388 shp->fdstatus[r] = shp->fdstatus[fno]; in exfile()
431 shp->st.execbrk = shp->st.breakcnt = 0; in exfile()
[all …]
H A Dio.c428 shp->fdptrs = (int**)(&shp->sftable[n]); in sh_iovalidfd()
431 shp->fdstatus = (unsigned char*)(&shp->fdptrs[n]); in sh_iovalidfd()
612 if(shp->fdptrs[fd]=shp->fdptrs[f2]) in io_preserve()
620 shp->fdstatus[fd] = shp->fdstatus[f2]; in io_preserve()
1524 io_preserve(shp,shp->sftable[fn],fn); in sh_redirect()
1544 shp->fdstatus[fn] = shp->fdstatus[fd]; in sh_redirect()
1741 shp->fdstatus[savefd] = shp->fdstatus[origfd]; in sh_iosave()
1832 shp->sftable[origfd] = shp->sftable[savefd]; in sh_iorestore()
1918 else if(shp->bltinfun && (shp->trapnote&SH_SIGTRAP) && shp->lastsig) in slowexcept()
1925 if(shp->bltinfun && shp->bltindata.sigset) in slowexcept()
[all …]
H A Dtrestore.c51 t = r_tree(shp); in sh_trestore()
126 t->sw.swarg = r_arg(shp); in r_tree()
147 shp->st.staklist = 0; in r_tree()
151 if(shp->st.filename) in r_tree()
152 fp->functnam = stkcopy(shp->stk,shp->st.filename); in r_tree()
181 Stk_t *stkp=shp->stk; in r_arg()
201 sh_endword(shp,1); in r_arg()
204 ap = sh_endword(shp,0); in r_arg()
248 if(shp->heredocs) in r_redirect()
273 com->comset = r_arg(shp); in r_comarg()
[all …]
H A Dpath.c83 if (shp->gd->user && *shp->gd->user) in path_xattr()
243 if(shp->pwd) in path_pwd()
468 shp->pathlist = pp = (void*)path_addpath(shp,(Pathcomp_t*)shp->pathlist,val,PATH_PATH); in path_init()
711 pp=sh_isstate(SH_DEFPATH)?shp->defpathlist:shp->pathlist; in path_search()
1268 shp->comdiv=0; in exscript()
1275 if(shp->cpid && shp->outpipe) in exscript()
1277 shp->cpid = 0; in exscript()
1281 VALIDATE_FD(shp, shp->infd); in exscript()
1282 if(shp->infd>0 && (shp->fdstatus[shp->infd]&IOCLEX)) in exscript()
1338 shp->infd = sh_iomovefd(shp->infd); in exscript()
[all …]
H A Dinit.c366 pp->shp = shp; in put_restricted()
390 pp->shp = shp; in put_cdpath()
1336 shp->bltindata.shp = shp; in sh_init()
1521 if(shp->gd->userid!=shp->gd->euserid || shp->gd->groupid!=shp->gd->egroupid) in sh_init()
1553 shp->st.self = &shp->global; in sh_init()
1560 shp->bltindata.shp = shp; in sh_init()
1628 shp->last_root = shp->var_tree; in sh_reinit()
1631 (*shp->userinit)(shp, 1); in sh_reinit()
1689 shp->inpipe = shp->outpipe = 0; in sh_reinit()
1826 shp->nvfun.last = (char*)shp; in nv_init()
[all …]
H A Dname.c323 if(shp->namespace && nv_dict(shp->namespace)==shp->var_tree) in nv_setlist()
335 shp->prefix_root = shp->first_root = 0; in nv_setlist()
533 np = nv_open(cp,shp->prefix_root?shp->prefix_root:shp->var_tree,flag); in nv_setlist()
624 np = nv_open(cp,shp->prefix_root?shp->prefix_root:shp->var_tree,flags); in nv_setlist()
835 …if(shp->var_tree->walk==shp->var_base || (shp->var_tree->walk!=shp->var_tree && shp->namespace && … in nv_create()
917 shp->last_table = shp->namespace; in nv_create()
1571 shp->last_root = shp->var_base; in nv_open()
3341 shp->prev_table = shp->last_table; in nv_rename()
3342 shp->prev_root = shp->last_root; in nv_rename()
3453 if(shp->last_root == shp->var_tree && root!=shp->var_tree) in nv_setref()
[all …]
H A Dargs.c108 ap->sh = shp; in sh_argopen()
409 shp->gd->euserid = shp->gd->userid; in sh_applyopts()
410 shp->gd->egroupid = shp->gd->groupid; in sh_applyopts()
413 else if((shp->gd->userid!=shp->gd->euserid && setuid(shp->gd->euserid)<0) || in sh_applyopts()
414 (shp->gd->groupid!=shp->gd->egroupid && setgid(shp->gd->egroupid)<0) || in sh_applyopts()
415 (shp->gd->userid==shp->gd->euserid && shp->gd->groupid==shp->gd->egroupid)) in sh_applyopts()
810 sfputr(shp->stk,shp->fifo,0); in sh_argprocsub()
814 shp->inpipe = shp->outpipe = 0; in sh_argprocsub()
833 sh_iosave(shp,-pv[fd], shp->topfd, (char*)0); in sh_argprocsub()
835 free(shp->fifo); in sh_argprocsub()
[all …]
/illumos-gate/usr/src/common/smbios/
H A Dsmb_open.c128 smbios_checksum(shp, &shp->sh_ent); in smbios_bufopen_21()
182 smbios_checksum(shp, &shp->sh_ent); in smbios_bufopen_30()
247 if (shp == NULL) in smbios_bufopen()
262 shp->sh_buf = buf; in smbios_bufopen()
270 if (shp->sh_structs == NULL || shp->sh_hash == NULL) in smbios_bufopen()
273 hp = shp->sh_buf; in smbios_bufopen()
349 smb_strip(shp); in smbios_bufopen()
351 return (shp); in smbios_bufopen()
365 smb_free(shp->sh_hash, sizeof (smb_struct_t *) * shp->sh_hashlen); in smbios_close()
368 smb_free((void *)shp->sh_buf, shp->sh_buflen); in smbios_close()
[all …]
H A Dsmb_info.c274 return (shp->sh_ent_type); in smbios_info_smbios()
402 if (smb_libgteq(shp, SMB_VERSION_31)) { in smbios_info_bios()
424 smb_gteq(shp, SMB_VERSION_24)) { in smbios_info_bios()
436 smb_gteq(shp, SMB_VERSION_31)) { in smbios_info_bios()
553 if (smb_libgteq(shp, SMB_VERSION_35)) { in smbios_info_chassis()
576 if (!smb_gteq(shp, SMB_VERSION_27)) { in smbios_info_chassis()
580 if (smb_libgteq(shp, SMB_VERSION_27)) { in smbios_info_chassis()
1229 if (!smb_gteq(shp, SMB_VERSION_37)) { in smbios_info_memdevice()
1457 smbios_psn(smbios_hdl_t *shp) in smbios_psn() argument
1465 smbios_csn(smbios_hdl_t *shp) in smbios_csn() argument
[all …]
/illumos-gate/usr/src/contrib/ast/src/cmd/ksh93/bltins/
H A Dtrap.c48 register Shell_t *shp = context->shp; in b_trap() local
105 char **trap = (shp->st.otrap?shp->st.otrap:shp->st.trap); in b_trap()
138 if(!shp->fn_depth || shp->end_fn) in b_trap()
151 char **trapcom = (shp->st.otrapcom?shp->st.otrapcom:shp->st.trapcom); in b_trap()
174 if(!shp->fn_depth || shp->end_fn) in b_trap()
181 sig_list(shp,-2); in b_trap()
189 register Shell_t *shp = context->shp; in b_kill() local
247 if((sig=sig_number(shp,signame)) < 0 || sig > shp->gd->sigmax) in b_kill()
347 …if(sig>shp->gd->sigruntime[SH_SIGRTMIN]+(shp->gd->sigruntime[SH_SIGRTMAX]-shp->gd->sigruntime[SH_S… in sig_name()
419 trapcom = (shp->st.otrapcom?shp->st.otrapcom:shp->st.trapcom); in sig_list()
[all …]
H A Dmisc.c105 shp = context->shp; in B_login()
119 if(shp->subshell && !shp->subshare) in B_login()
163 Shell_t *shp = context->shp; in b_let() local
185 register Shell_t *shp = context->shp; in b_eval() local
212 register Shell_t *shp = context->shp; in b_dot_cmd() local
265 shp->st.var_local = shp->st.save_tree = shp->var_tree; in b_dot_cmd()
312 *shp->st.self = shp->st; in b_dot_cmd()
347 register Shell_t *shp = context->shp; in b_shift() local
373 register Shell_t *shp = context->shp; in b_wait() local
399 register Shell_t *shp = context->shp; in b_bg() local
[all …]
H A Dcd_pwd.c57 register Shell_t *shp = context->shp; in b_cd() local
84 oldpwd = path_pwd(shp,0); in b_cd()
101 if(!(cdpath = (Pathcomp_t*)shp->cdpathlist) && (dp=sh_scoped(shp,CDPNOD)->nvalue.cp)) in b_cd()
106 cdpath->shp = shp; in b_cd()
110 oldpwd = path_pwd(shp,1); in b_cd()
117 cp = sfstruse(shp->strbuf); in b_cd()
121 if(!shp->strbuf2) in b_cd()
208 shp->pwd = pwdnod->nvalue.cp; in b_cd()
210 path_newdir(shp,shp->pathlist); in b_cd()
211 path_newdir(shp,shp->cdpathlist); in b_cd()
[all …]
H A Dcflow.c49 register Shell_t *shp = context->shp; in b_return() local
50 struct checkpt *pp = (struct checkpt*)shp->jmplist; in b_return()
68 if(n<0 || n==256 || n > SH_EXITMASK+shp->gd->sigmax+1) in b_return()
71 if(shp->fn_depth==0 && shp->dot_depth==0 && !sh_isstate(SH_PROFILE)) in b_return()
73 sh_exit(shp->savexit=n); in b_return()
89 register Shell_t *shp = context->shp; in b_break() local
109 if(shp->st.loopcnt) in b_break()
111 shp->st.execbrk = shp->st.breakcnt = n; in b_break()
112 if(shp->st.breakcnt > shp->st.loopcnt) in b_break()
113 shp->st.breakcnt = shp->st.loopcnt; in b_break()
[all …]
H A Dread.c67 register Shell_t *shp = context->shp; in b_read() local
131 if(sh_inuse(shp,fd)) in b_read()
148 r = sh_iocheckfd(shp,fd); in b_read()
174 shp->timeout = 0; in b_read()
176 shp->nextprompt = 0; in b_read()
179 if(r==0 && (r=(sfeof(shp->sftable[fd])||sferror(shp->sftable[fd])))) in b_read()
182 sh_pclose(shp->cpipe); in b_read()
230 if(!(iop=shp->sftable[fd]) && !(iop=sh_iostream(shp,fd))) in sh_readline()
274 if(dtvnext(shp->var_tree) || shp->namespace) in sh_readline()
497 if(!shp->gd->hist_ptr) in sh_readline()
[all …]
H A Dsleep.c49 register Shell_t *shp = context->shp; in b_sleep() local
116 shp->lastsig=0; in b_sleep()
120 sh_sigcheck(shp); in b_sleep()
125 sh_timetraps(shp); in b_sleep()
138 Shell_t *shp = sh_getinterp(); in sleep() local
142 shp->lastsig = 0; in sleep()
146 if(!shp->gd->waitevent || (*shp->gd->waitevent)(-1,-1L,0)==0) in sleep()
149 sh_timetraps(shp); in sleep()
153 shp->lastsig = 0; in sleep()
154 shp->trapnote &= ~SH_SIGSET; in sleep()
[all …]
H A Dgetopts.c39 Stk_t *stkp = shp->stk; in infof()
41 if((shp->namespace && sh_fsearch(shp,s,0)) || nv_search(s,shp->fun_tree,0)) in infof()
62 register Shell_t *shp = context->shp; in b_getopts() local
74 disc.sh = shp; in b_getopts()
104 argv = shp->st.dolv; in b_getopts()
105 argc = shp->st.dolc; in b_getopts()
116 sh_popcontext(shp,&buff); in b_getopts()
117 shp->st.opterror = 1; in b_getopts()
145 shp->st.opterror = 1; in b_getopts()
153 if(shp->st.opterror) in b_getopts()
[all …]
/illumos-gate/usr/src/lib/libsysevent/
H A Dlibsysevent.c1782 free(shp); in sysevent_open_channel_common()
1800 free(shp); in sysevent_open_channel_common()
1807 return (shp); in sysevent_open_channel_common()
1913 free(shp); in sysevent_close_channel()
1999 if (fattach(SH_DOOR_DESC(shp), SH_DOOR_NAME(shp)) != 0) { in sysevent_bind_publisher()
2020 if (create_cached_registration(shp, SH_CLASS_HASH(shp)) != 0) { in sysevent_bind_publisher()
2203 if (fattach(SH_DOOR_DESC(shp), SH_DOOR_NAME(shp)) != 0) { in sysevent_bind_subscriber_cmn()
2265 SH_ID(shp) = 0; in sysevent_bind_subscriber_cmn()
2479 if (shp == NULL) in sysevent_unbind_subscriber()
2551 SH_ID(shp) = 0; in sysevent_unbind_publisher()
[all …]
/illumos-gate/usr/src/cmd/smbios/
H A Dsmbios.c82 if (shp != NULL) { in smbios_warn()
2013 print_bios(shp, fp); in print_struct()
2017 print_system(shp, fp); in print_struct()
2086 print_hwsec(shp, fp); in print_struct()
2106 print_boot(shp, fp); in print_struct()
2110 print_ipmi(shp, fp); in print_struct()
2230 smbios_hdl_t *shp; in main() local
2309 smbios_close(shp); in main()
2315 smbios_close(shp); in main()
2330 smbios_close(shp); in main()
[all …]
/illumos-gate/usr/src/cmd/fm/fmd/common/
H A Dfmd_scheme.c272 fmd_scheme_hash_t *shp; in fmd_scheme_hash_create() local
282 shp->sch_hashlen, FMD_SLEEP); in fmd_scheme_hash_create()
287 shp->sch_hash[fmd_strhash(sp->sch_name) % shp->sch_hashlen] = sp; in fmd_scheme_hash_create()
289 return (shp); in fmd_scheme_hash_create()
302 fmd_scheme_hash_release(shp, sp); in fmd_scheme_hash_destroy()
306 fmd_free(shp->sch_hash, sizeof (fmd_scheme_t *) * shp->sch_hashlen); in fmd_scheme_hash_destroy()
307 fmd_strfree(shp->sch_dirpath); in fmd_scheme_hash_destroy()
317 if (shp == NULL || pthread_rwlock_trywrlock(&shp->sch_rwlock) != 0) in fmd_scheme_hash_trygc()
324 fmd_scheme_hash_release(shp, sp); in fmd_scheme_hash_trygc()
328 bzero(shp->sch_hash, sizeof (fmd_scheme_t *) * shp->sch_hashlen); in fmd_scheme_hash_trygc()
[all …]
H A Dfmd_serd.c58 shp->sh_hashlen = fmd.d_str_buckets; in fmd_serd_hash_create()
59 shp->sh_hash = fmd_zalloc(sizeof (void *) * shp->sh_hashlen, FMD_SLEEP); in fmd_serd_hash_create()
60 shp->sh_count = 0; in fmd_serd_hash_create()
76 fmd_free(shp->sh_hash, sizeof (void *) * shp->sh_hashlen); in fmd_serd_hash_destroy()
77 bzero(shp, sizeof (fmd_serd_hash_t)); in fmd_serd_hash_destroy()
95 return (shp->sh_count); in fmd_serd_hash_count()
123 sgp->sg_next = shp->sh_hash[h]; in fmd_serd_eng_insert()
124 shp->sh_hash[h] = sgp; in fmd_serd_eng_insert()
125 shp->sh_count++; in fmd_serd_eng_insert()
160 ASSERT(shp->sh_count != 0); in fmd_serd_eng_delete()
[all …]
/illumos-gate/usr/src/uts/intel/os/
H A Dfmsmb.c536 smbios_hdl_t *shp; in fm_smb_fmacompat() local
545 shp = ksmbios; in fm_smb_fmacompat()
546 if (shp == NULL) { in fm_smb_fmacompat()
902 smbios_hdl_t *shp; in smb_bboard() local
913 shp = ksmbios; in smb_bboard()
914 if (shp == NULL) { in smb_bboard()
988 smbios_hdl_t *shp; in fm_smb_chipinst() local
996 shp = ksmbios; in fm_smb_chipinst()
997 if (shp == NULL) { in fm_smb_chipinst()
1043 shp = ksmbios; in fm_smb_mc_bboards()
[all …]
/illumos-gate/usr/src/lib/fm/topo/modules/i86pc/chip/
H A Dchip_smbios.c103 smbios_hdl_t *shp; in extdimmslot_to_dimmslot() local
106 if (shp == NULL) in extdimmslot_to_dimmslot()
253 smbios_hdl_t *shp; in chip_get_smbstruct() local
256 if (shp == NULL) in chip_get_smbstruct()
268 if (shp != NULL) { in chip_get_smbstruct()
295 if (shp != NULL) { in chip_get_smbstruct()
380 smbios_hdl_t *shp; in chip_smbios_iterate() local
383 if (shp == NULL) in chip_smbios_iterate()
542 smbios_hdl_t *shp; in chip_label_smbios_get() local
545 if (shp != NULL) { in chip_label_smbios_get()
[all …]

12345