/titanic_41/usr/src/common/smbios/ |
H A D | smb_open.c | 45 smb_strip(smbios_hdl_t *shp) in smb_strip() argument 49 for (i = 0; i < shp->sh_nstructs; i++) { in smb_strip() 50 const smb_header_t *hp = shp->sh_structs[i].smbst_hdr; in smb_strip() 66 if (smbios_info_common(shp, hp->smbh_hdl, &info) != SMB_ERR) { in smb_strip() 76 smbios_bufopen_21(smbios_hdl_t *shp, const smbios_21_entry_t *ep, size_t len, in smbios_bufopen_21() argument 85 smb_dprintf(shp, "opening SMBIOS version %u.%u bcdrev 0x%x\n", in smbios_bufopen_21() 114 smb_dprintf(shp, "bad cksum: e=%x i=%x\n", esum, isum); in smbios_bufopen_21() 124 shp->sh_ent_type = SMBIOS_ENTRY_POINT_21; in smbios_bufopen_21() 125 bcopy(ep, &shp->sh_ent, sizeof (smbios_entry_t)); in smbios_bufopen_21() 126 shp->sh_ent.ep21.smbe_elen = sizeof (smbios_entry_t); in smbios_bufopen_21() [all …]
|
H A D | smb_info.c | 227 smbios_info_smbios(smbios_hdl_t *shp, smbios_entry_t *ep) in smbios_info_smbios() argument 229 bcopy(&shp->sh_ent, ep, sizeof (smbios_entry_t)); in smbios_info_smbios() 230 return (shp->sh_ent_type); in smbios_info_smbios() 234 smbios_info_smbios_version(smbios_hdl_t *shp, smbios_version_t *v) in smbios_info_smbios_version() argument 236 v->smbv_major = SMB_MAJOR(shp->sh_smbvers); in smbios_info_smbios_version() 237 v->smbv_minor = SMB_MINOR(shp->sh_smbvers); in smbios_info_smbios_version() 246 smbios_info_common(smbios_hdl_t *shp, id_t id, smbios_info_t *ip) in smbios_info_common() argument 248 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_common() 299 return (n ? 0 : smb_set_errno(shp, ESMB_NOINFO)); in smbios_info_common() 309 smbios_info_contains(smbios_hdl_t *shp, id_t id, uint_t idc, id_t *idv) in smbios_info_contains() argument [all …]
|
/titanic_41/usr/src/lib/libshell/common/sh/ |
H A D | xec.c | 105 static int p_time(Shell_t *shp, Sfio_t *out, const char *format, clock_t *tm) in p_time() argument 110 Stk_t *stkp = shp->stk; in p_time() 395 int sh_debug(Shell_t *shp, const char *trap, const char *name, const char *subscript, char *const a… in sh_debug() argument 397 Stk_t *stkp=shp->stk; in sh_debug() 405 if(shp->indebug) in sh_debug() 407 shp->indebug = 1; in sh_debug() 438 shp->st.lineno = error_info.line; in sh_debug() 439 level = shp->fn_depth+shp->dot_depth; in sh_debug() 444 savst = shp->st; in sh_debug() 445 shp->st.trap[SH_DEBUGTRAP] = 0; in sh_debug() [all …]
|
H A D | subshell.c | 60 Shell_t *shp; /* shell interpreter */ member 102 Shell_t *shp = &sh; in sh_subtmpfile() local 105 register struct checkpt *pp = (struct checkpt*)shp->jmplist; in sh_subtmpfile() 114 shp->fdstatus[fd] = shp->fdstatus[1]|IOCLEX; in sh_subtmpfile() 116 shp->fdstatus[1] = IOCLOSE; in sh_subtmpfile() 120 ((struct checkpt*)shp->jmplist)->mode = SH_JMPERREXIT; in sh_subtmpfile() 121 shp->toomany = 1; in sh_subtmpfile() 124 if(shp->subshare || !pflag) in sh_subtmpfile() 129 shp->fdstatus[fd] = IOREAD|IOWRITE; in sh_subtmpfile() 136 shp->fdstatus[1] = shp->fdstatus[fd]; in sh_subtmpfile() [all …]
|
H A D | main.c | 56 static void chkmail(Shell_t *shp, char*); 88 Shell_t *shp = (Shell_t*)context; in fts_sigcheck() local 91 if(shp->trapnote&SH_SIGSET) in fts_sigcheck() 111 int sh_source(Shell_t *shp, Sfio_t *iop, const char *file) in sh_source() argument 124 shp->st.filename = path_fullname(stakptr(PATH_OFFSET)); in sh_source() 126 exfile(shp, iop, fd); in sh_source() 143 register Shell_t *shp; in sh_main() local 157 shp = sh_init(ac,av,userinit); in sh_main() 162 fts_notify(fts_sigcheck,(void*)shp); in sh_main() 164 if(sigsetjmp(*((sigjmp_buf*)shp->jmpbuffer),0)) in sh_main() [all …]
|
H A D | fault.c | 63 register Shell_t *shp = sh_getinterp(); in sh_fault() local 66 register struct checkpt *pp = (struct checkpt*)shp->jmplist; in sh_fault() 82 shp->winch++; in sh_fault() 85 if(shp->savesig) in sh_fault() 88 shp->savesig = sig; in sh_fault() 91 trap = shp->st.trapcom[sig]; in sh_fault() 92 if(sig==SIGALRM && shp->bltinfun==b_sleep) in sh_fault() 96 shp->trapnote |= SH_SIGTRAP; in sh_fault() 97 shp->sigflag[sig] |= SH_SIGTRAP; in sh_fault() 101 if(shp->subshell && sig!=SIGINT && sig!=SIGQUIT && sig!=SIGWINCH && sig!=SIGCONT) in sh_fault() [all …]
|
H A D | trestore.c | 47 Shnode_t *sh_trestore(Shell_t *shp,Sfio_t *in) in sh_trestore() argument 51 t = r_tree(shp); in sh_trestore() 57 static Shnode_t *r_tree(Shell_t *shp) in r_tree() argument 69 t = getnode(shp->stk,parnod); in r_tree() 70 t->par.partre = r_tree(shp); in r_tree() 73 t = getnode(shp->stk,comnod); in r_tree() 75 r_comarg(shp,(struct comnod*)t); in r_tree() 79 t = getnode(shp->stk,forknod); in r_tree() 81 t->fork.forktre = r_tree(shp); in r_tree() 82 t->fork.forkio = r_redirect(shp); in r_tree() [all …]
|
H A D | init.c | 208 Shell_t *shp = nv_shell(np); in put_ed() local 209 if(*name=='E' && nv_getval(sh_scoped(shp,VISINOD))) in put_ed() 211 if(!(cp=val) && (*name=='E' || !(cp=nv_getval(sh_scoped(shp,EDITNOD))))) in put_ed() 235 Shell_t *shp = nv_shell(np); in put_history() local 236 void *histopen = shp->hist_ptr; in put_history() 244 hist_close(shp->hist_ptr); in put_history() 250 sh_histinit(shp); in put_history() 259 Shell_t *shp = nv_shell(np); in put_optindex() local 260 shp->st.opterror = shp->st.optchar = 0; in put_optindex() 284 Shell_t *shp = nv_shell(np); in put_restricted() local [all …]
|
H A D | io.c | 385 void sh_ioinit(Shell_t *shp) in sh_ioinit() argument 391 n = shp->lim.open_max+2; in sh_ioinit() 393 n = shp->lim.open_max; in sh_ioinit() 395 shp->fdstatus = (unsigned char*)malloc((unsigned)n); in sh_ioinit() 396 memset((char*)shp->fdstatus,0,n); in sh_ioinit() 397 shp->fdptrs = (int**)malloc(n*sizeof(int*)); in sh_ioinit() 398 memset((char*)shp->fdptrs,0,n*sizeof(int*)); in sh_ioinit() 399 shp->sftable = (Sfio_t**)malloc(n*sizeof(Sfio_t*)); in sh_ioinit() 400 memset((char*)shp->sftable,0,n*sizeof(Sfio_t*)); in sh_ioinit() 401 shp->sftable[0] = sfstdin; in sh_ioinit() [all …]
|
H A D | args.c | 101 void *sh_argopen(Shell_t *shp) in sh_argopen() argument 105 ap->sh = shp; in sh_argopen() 140 Shell_t *shp = (Shell_t*)context; in sh_argopts() local 142 register Arg_t *ap = (Arg_t*)(shp->arg_context); in sh_argopts() 143 Lex_t *lp = (Lex_t*)(shp->lex_context); in sh_argopts() 385 void sh_applyopts(Shell_t* shp,Shopt_t newflags) in sh_applyopts() argument 392 …h_isstate(SH_INIT) && is_option(&((Arg_t*)shp->arg_context)->sh->offoptions,SH_PRIVILEGED) && shp-… in sh_applyopts() 396 setuid(shp->userid); in sh_applyopts() 397 setgid(shp->groupid); in sh_applyopts() 398 if(shp->euserid==0) in sh_applyopts() [all …]
|
H A D | macro.c | 59 Shell_t *shp; /* pointer to shell interpreter */ member 114 void *sh_macopen(Shell_t *shp) in sh_macopen() argument 118 mp->shp = shp; in sh_macopen() 125 char *sh_mactry(Shell_t *shp,register char *string) in sh_mactry() argument 130 int savexit = shp->savexit; in sh_mactry() 135 string = sh_mactrim(shp,string,0); in sh_mactry() 137 shp->savexit = savexit; in sh_mactry() 150 char *sh_mactrim(Shell_t *shp, char *str, register int mode) in sh_mactrim() argument 152 register Mac_t *mp = (Mac_t*)shp->mac_context; in sh_mactrim() 153 Stk_t *stkp = shp->stk; in sh_mactrim() [all …]
|
H A D | path.c | 233 Shell_t *shp = &sh; in path_pwd() local 234 if(shp->pwd) in path_pwd() 235 return((char*)shp->pwd); in path_pwd() 279 shp->pwd = (char*)(PWDNOD->nvalue.cp); in path_pwd() 405 first = (pp->flags&PATH_CDPATH)?pp->shp->cdpathlist:path_get(""); in path_checkdup() 440 ppnext->shp = pp->shp; in path_nextcomp() 473 static Pathcomp_t* defpath_init(Shell_t *shp) in defpath_init() argument 476 if(shp->defpathlist = (void*)pp) in defpath_init() 477 pp->shp = shp; in defpath_init() 481 static void path_init(Shell_t *shp) in path_init() argument [all …]
|
/titanic_41/usr/src/lib/libsysevent/ |
H A D | libsysevent.c | 65 static int cleanup_id(sysevent_handle_t *shp, uint32_t id, int type); 760 subscriber_event_handler(sysevent_handle_t *shp) in subscriber_event_handler() argument 765 sub_info = (subscriber_priv_t *)SH_PRIV_DATA(shp); in subscriber_event_handler() 773 while (sub_info->sp_evq_head == NULL && SH_BOUND(shp)) { in subscriber_event_handler() 786 if (!SH_BOUND(shp)) { in subscriber_event_handler() 818 sysevent_handle_t *shp; in event_deliver_service() local 832 shp = (sysevent_handle_t *)cookie; in event_deliver_service() 833 if (shp == NULL) { in event_deliver_service() 842 if (mutex_trylock(SH_LOCK(shp)) != 0) { in event_deliver_service() 847 if (!SH_BOUND(shp)) { in event_deliver_service() [all …]
|
/titanic_41/usr/src/lib/libshell/common/bltins/ |
H A D | misc.c | 66 logdata.sh = ((Shbltin_t*)extra)->shp; in b_exec() 102 register Shell_t *shp; in B_login() local 105 shp = ((Shbltin_t*)extra)->shp; in B_login() 109 shp = logp->sh; in B_login() 111 pp = (struct checkpt*)shp->jmplist; in B_login() 116 register struct argnod *arg=shp->envlist; in B_login() 119 if(shp->subshell && !shp->subshare) in B_login() 124 env_close(shp->env); in B_login() 125 shp->env = env_open((char**)0,3); in B_login() 127 nv_scan(shp->var_tree,noexport,0,NV_EXPORT,NV_EXPORT); in B_login() [all …]
|
H A D | cflow.c | 49 register Shell_t *shp = ((Shbltin_t*)extra)->shp; in b_return() local 50 struct checkpt *pp = (struct checkpt*)shp->jmplist; in b_return() 67 n = (((arg= *argv)?(int)strtol(arg, (char**)0, 10)&SH_EXITMASK:shp->oldexit)); in b_return() 69 if(shp->fn_depth==0 && shp->dot_depth==0 && !sh_isstate(SH_PROFILE)) in b_return() 71 sh_exit(shp->savexit=n); in b_return() 87 register Shell_t *shp = ((Shbltin_t*)extra)->shp; in b_break() local 107 if(shp->st.loopcnt) in b_break() 109 shp->st.execbrk = shp->st.breakcnt = n; in b_break() 110 if(shp->st.breakcnt > shp->st.loopcnt) in b_break() 111 shp->st.breakcnt = shp->st.loopcnt; in b_break() [all …]
|
H A D | read.c | 65 register Shell_t *shp = ((Shbltin_t*)extra)->shp; in b_read() local 66 long timeout = 1000*shp->st.tmout; in b_read() 108 if((fd = shp->cpipe[0])<=0) in b_read() 144 if(!((r=shp->fdstatus[fd])&IOREAD) || !(r&(IOSEEK|IONOSEEK))) in b_read() 145 r = sh_iocheckfd(shp,fd); in b_read() 164 shp->prompt = default_prompt; in b_read() 165 if(r && (shp->prompt=(char*)sfreserve(sfstderr,r,SF_LOCKR))) in b_read() 167 memcpy(shp->prompt,name,r); in b_read() 168 sfwrite(sfstderr,shp->prompt,r-1); in b_read() 170 shp->timeout = 0; in b_read() [all …]
|
H A D | trap.c | 48 register Shell_t *shp = ((Shbltin_t*)extra)->shp; in b_trap() local 113 if(arg=shp->st.trap[sig]) in b_trap() 117 if(shp->st.trap[sig]) in b_trap() 118 free(shp->st.trap[sig]); in b_trap() 119 shp->st.trap[sig] = 0; in b_trap() 121 shp->st.trap[sig] = strdup(action); in b_trap() 124 if(shp->st.trap[sig]) in b_trap() 125 shp->trapnote |= SH_SIGTRAP; in b_trap() 127 shp->trapnote = 0; in b_trap() 131 if(sig>shp->sigmax) in b_trap() [all …]
|
/titanic_41/usr/src/cmd/fm/fmd/common/ |
H A D | fmd_scheme.c | 255 fmd_scheme_hash_t *shp; in fmd_scheme_hash_create() local 259 shp = fmd_alloc(sizeof (fmd_scheme_hash_t), FMD_SLEEP); in fmd_scheme_hash_create() 261 shp->sch_dirpath = fmd_strdup(path, FMD_SLEEP); in fmd_scheme_hash_create() 262 (void) pthread_rwlock_init(&shp->sch_rwlock, NULL); in fmd_scheme_hash_create() 263 shp->sch_hashlen = fmd.d_str_buckets; in fmd_scheme_hash_create() 264 shp->sch_hash = fmd_zalloc(sizeof (fmd_scheme_t *) * in fmd_scheme_hash_create() 265 shp->sch_hashlen, FMD_SLEEP); in fmd_scheme_hash_create() 270 shp->sch_hash[fmd_strhash(sp->sch_name) % shp->sch_hashlen] = sp; in fmd_scheme_hash_create() 272 return (shp); in fmd_scheme_hash_create() 276 fmd_scheme_hash_destroy(fmd_scheme_hash_t *shp) in fmd_scheme_hash_destroy() argument [all …]
|
H A D | fmd_serd.c | 58 fmd_serd_hash_create(fmd_serd_hash_t *shp) in fmd_serd_hash_create() argument 60 shp->sh_hashlen = fmd.d_str_buckets; in fmd_serd_hash_create() 61 shp->sh_hash = fmd_zalloc(sizeof (void *) * shp->sh_hashlen, FMD_SLEEP); in fmd_serd_hash_create() 62 shp->sh_count = 0; in fmd_serd_hash_create() 66 fmd_serd_hash_destroy(fmd_serd_hash_t *shp) in fmd_serd_hash_destroy() argument 71 for (i = 0; i < shp->sh_hashlen; i++) { in fmd_serd_hash_destroy() 72 for (sgp = shp->sh_hash[i]; sgp != NULL; sgp = ngp) { in fmd_serd_hash_destroy() 78 fmd_free(shp->sh_hash, sizeof (void *) * shp->sh_hashlen); in fmd_serd_hash_destroy() 79 bzero(shp, sizeof (fmd_serd_hash_t)); in fmd_serd_hash_destroy() 83 fmd_serd_hash_apply(fmd_serd_hash_t *shp, fmd_serd_eng_f *func, void *arg) in fmd_serd_hash_apply() argument [all …]
|
/titanic_41/usr/src/lib/libsmbios/common/ |
H A D | smb_lib.c | 55 smbios_hdl_t *shp = NULL; in smb_fileopen() local 62 return (smb_open_error(shp, errp, n < 0 ? errno : ESMB_NOHDR)); in smb_fileopen() 73 return (smb_open_error(shp, errp, ESMB_HEADER)); in smb_fileopen() 77 return (smb_open_error(shp, errp, n < 0 ? errno : ESMB_NOHDR)); in smb_fileopen() 89 return (smb_open_error(shp, errp, ESMB_NOMEM)); in smb_fileopen() 93 return (smb_open_error(shp, errp, n < 0 ? errno : ESMB_NOSTAB)); in smb_fileopen() 96 shp = smbios_bufopen(ep, stbuf, smbe_stlen, version, flags, errp); in smb_fileopen() 98 if (shp != NULL) in smb_fileopen() 99 shp->sh_flags |= SMB_FL_BUFALLOC; in smb_fileopen() 103 return (shp); in smb_fileopen() [all …]
|
/titanic_41/usr/src/uts/intel/os/ |
H A D | fmsmb.c | 182 smb_cnttypes(smbios_hdl_t *shp, int type) in smb_cnttypes() argument 184 const smb_struct_t *sp = shp->sh_structs; in smb_cnttypes() 185 int nstructs = shp->sh_nstructs; in smb_cnttypes() 197 smb_strcnt(smbios_hdl_t *shp, smbs_cnt_t *stype) in smb_strcnt() argument 199 const smb_struct_t *sp = shp->sh_structs; in smb_strcnt() 200 int nstructs = shp->sh_nstructs; in smb_strcnt() 218 rc = smbios_info_bboard(shp, in smb_strcnt() 264 smb_bb_contains(smbios_hdl_t *shp, smbs_cnt_t *stype) in smb_bb_contains() argument 277 (void) smbios_info_bboard(shp, stype->ids[cnt]->id, &smb_bb); in smb_bb_contains() 288 rc = smbios_info_contains(shp, stype->ids[cnt]->id, in smb_bb_contains() [all …]
|
/titanic_41/usr/src/cmd/prtdiag/i386/ |
H A D | smbios.c | 71 do_procs(smbios_hdl_t *shp, const smbios_struct_t *sp, void *arg) in do_procs() argument 80 smbios_info_processor(shp, sp->smbstr_id, &p) != SMB_ERR && in do_procs() 81 smbios_info_common(shp, sp->smbstr_id, &info) != SMB_ERR && in do_procs() 122 do_memdevs(smbios_hdl_t *shp, const smbios_struct_t *sp, void *arg) in do_memdevs() argument 127 smbios_info_memdevice(shp, sp->smbstr_id, &md) != SMB_ERR) { in do_memdevs() 148 do_obdevs(smbios_hdl_t *shp, const smbios_struct_t *sp, void *arg) in do_obdevs() argument 154 (argc = smbios_info_obdevs(shp, sp->smbstr_id, 0, NULL)) > 0) { in do_obdevs() 156 (void) smbios_info_obdevs(shp, sp->smbstr_id, argc, argv); in do_obdevs() 166 do_slots(smbios_hdl_t *shp, const smbios_struct_t *sp, void *arg) in do_slots() argument 171 smbios_info_slot(shp, sp->smbstr_id, &s) != SMB_ERR) { in do_slots() [all …]
|
/titanic_41/usr/src/cmd/smbios/ |
H A D | smbios.c | 145 check_oem(smbios_hdl_t *shp) in check_oem() argument 154 rv = smbios_lookup_type(shp, SMB_TYPE_OEMSTR, &s); in check_oem() 161 cnt = smbios_info_strtab(shp, oem_id, 0, NULL); in check_oem() 164 (void) smbios_info_strtab(shp, oem_id, cnt, oem_str); in check_oem() 229 print_smbios(smbios_hdl_t *shp, FILE *fp) in print_smbios() argument 233 switch (smbios_info_smbios(shp, &ep)) { in print_smbios() 263 print_bios(smbios_hdl_t *shp, FILE *fp) in print_bios() argument 267 (void) smbios_info_bios(shp, &b); in print_bios() 306 print_system(smbios_hdl_t *shp, FILE *fp) in print_system() argument 311 (void) smbios_info_system(shp, &s); in print_system() [all …]
|
/titanic_41/usr/src/uts/common/io/sdcard/adapters/sdhost/ |
H A D | sdhost.c | 276 sdhost_t *shp; in sdhost_attach() local 297 shp = kmem_zalloc(sizeof (*shp), KM_SLEEP); in sdhost_attach() 298 ddi_set_driver_private(dip, shp); in sdhost_attach() 304 shp->sh_slots[i].ss_num = -1; in sdhost_attach() 311 shp->sh_dmaattr.dma_attr_version = DMA_ATTR_V0; in sdhost_attach() 312 shp->sh_dmaattr.dma_attr_addr_lo = 0; in sdhost_attach() 313 shp->sh_dmaattr.dma_attr_addr_hi = 0xffffffffU; in sdhost_attach() 314 shp->sh_dmaattr.dma_attr_count_max = 0xffffffffU; in sdhost_attach() 315 shp->sh_dmaattr.dma_attr_align = 4096; /* Ricoh needs it */ in sdhost_attach() 316 shp->sh_dmaattr.dma_attr_burstsizes = 0; /* for now! */ in sdhost_attach() [all …]
|
/titanic_41/usr/src/lib/fm/topo/modules/i86pc/chip/ |
H A D | chip_smbios.c | 103 smbios_hdl_t *shp; in extdimmslot_to_dimmslot() local 105 shp = topo_mod_smbios(mod); in extdimmslot_to_dimmslot() 106 if (shp == NULL) in extdimmslot_to_dimmslot() 111 (void) smbios_info_extmemdevice(shp, in extdimmslot_to_dimmslot() 126 (void) smbios_info_extmemdevice(shp, in extdimmslot_to_dimmslot() 128 (void) smbios_info_memdevice(shp, in extdimmslot_to_dimmslot() 212 smbios_hdl_t *shp; in chip_get_smbstruct() local 214 shp = topo_mod_smbios(mod); in chip_get_smbstruct() 215 if (shp == NULL) in chip_get_smbstruct() 227 if (shp != NULL) { in chip_get_smbstruct() [all …]
|