| /openbsd-src/sys/kern/ |
| H A D | subr_evcount.c | 40 evcount_attach(struct evcount *ec, const char *name, void *data) in evcount_attach() argument 44 memset(ec, 0, sizeof(*ec)); in evcount_attach() 45 ec->ec_name = name; in evcount_attach() 46 ec->ec_id = ++nextid; in evcount_attach() 47 ec->ec_data = data; in evcount_attach() 48 TAILQ_INSERT_TAIL(&evcount_list, ec, next); in evcount_attach() 52 evcount_percpu(struct evcount *ec) in evcount_percpu() argument 55 TAILQ_REMOVE(&evcount_list, ec, next); in evcount_percpu() 56 TAILQ_INSERT_TAIL(&evcount_percpu_init_list, ec, next); in evcount_percpu() 58 ec->ec_percpu = counters_alloc(1); in evcount_percpu() [all …]
|
| /openbsd-src/lib/libcrypto/cms/ |
| H A D | cms_enc.c | 74 cms_EncryptedContent_init_bio(CMS_EncryptedContentInfo *ec) in cms_EncryptedContent_init_bio() argument 79 X509_ALGOR *calg = ec->contentEncryptionAlgorithm; in cms_EncryptedContent_init_bio() 88 enc = ec->cipher ? 1 : 0; in cms_EncryptedContent_init_bio() 99 ciph = ec->cipher; in cms_EncryptedContent_init_bio() 103 if (ec->key) in cms_EncryptedContent_init_bio() 104 ec->cipher = NULL; in cms_EncryptedContent_init_bio() 134 if (!enc || !ec->key) { in cms_EncryptedContent_init_bio() 144 if (!ec->key) { in cms_EncryptedContent_init_bio() 145 ec->key = tkey; in cms_EncryptedContent_init_bio() 146 ec in cms_EncryptedContent_init_bio() 211 cms_EncryptedContent_init(CMS_EncryptedContentInfo * ec,const EVP_CIPHER * cipher,const unsigned char * key,size_t keylen) cms_EncryptedContent_init() argument 233 CMS_EncryptedContentInfo *ec; CMS_EncryptedData_set1_key() local [all...] |
| /openbsd-src/gnu/llvm/libcxx/src/filesystem/ |
| H A D | directory_iterator.cpp | 33 __dir_stream(const path& root, directory_options opts, error_code& ec) in __dir_stream() argument 36 ec = make_error_code(errc::no_such_file_or_directory); in __dir_stream() 41 ec = detail::make_windows_error(GetLastError()); in __dir_stream() 45 ec.value() == static_cast<int>(errc::permission_denied)) in __dir_stream() 46 ec.clear(); in __dir_stream() 50 advance(ec); in __dir_stream() 61 bool advance(error_code& ec) { in advance() argument 86 error_code ec; in close() local 88 ec = detail::make_windows_error(GetLastError()); in close() 90 return ec; in close() [all …]
|
| H A D | operations.cpp | 488 static FileDescriptor create(const path* p, error_code& ec, Args... args) { in create() 489 ec.clear(); in create() 492 ec = capture_errno(); in create() 499 static FileDescriptor create_with_status(const path* p, error_code& ec, in create_with_status() 501 FileDescriptor fd = create(p, ec, args...); in create_with_status() 502 if (!ec) in create_with_status() 503 fd.refresh_status(ec); in create_with_status() 513 file_status refresh_status(error_code& ec); 542 const StatT& path_stat, error_code* ec) { in create_file_status() argument 543 if (ec) in create_file_status() [all …]
|
| /openbsd-src/lib/libelf/ |
| H A D | libelf_phdr.c | 37 _libelf_getphdr(Elf *e, int ec) in _libelf_getphdr() argument 47 assert(ec == ELFCLASS32 || ec == ELFCLASS64); in _libelf_getphdr() 54 if ((phdr = (ec == ELFCLASS32 ? in _libelf_getphdr() 63 if ((ehdr = _libelf_ehdr(e, ec, 0)) == NULL) in _libelf_getphdr() 68 if (ec == ELFCLASS32) { in _libelf_getphdr() 90 if ((msz = _libelf_msize(ELF_T_PHDR, ec, EV_CURRENT)) == 0) in _libelf_getphdr() 98 if (ec == ELFCLASS32) in _libelf_getphdr() 104 xlator = _libelf_get_translator(ELF_T_PHDR, ELF_TOMEMORY, ec, in _libelf_getphdr() 113 _libelf_newphdr(Elf *e, int ec, size_t count) in _libelf_newphdr() argument 123 if ((ehdr = _libelf_ehdr(e, ec, 0)) == NULL) { in _libelf_newphdr() [all …]
|
| H A D | gelf_syminfo.c | 37 int ec; in gelf_getsyminfo() local 55 ec = e->e_class; in gelf_getsyminfo() 56 assert(ec == ELFCLASS32 || ec == ELFCLASS64); in gelf_getsyminfo() 58 if (ec == ELFCLASS32) in gelf_getsyminfo() 68 if ((msz = _libelf_msize(ELF_T_SYMINFO, ec, e->e_version)) == 0) in gelf_getsyminfo() 78 if (ec == ELFCLASS32) { in gelf_getsyminfo() 98 int ec; in gelf_update_syminfo() local 116 ec = e->e_class; in gelf_update_syminfo() 117 assert(ec == ELFCLASS32 || ec == ELFCLASS64); in gelf_update_syminfo() 119 if (ec == ELFCLASS32) in gelf_update_syminfo() [all …]
|
| H A D | gelf_cap.c | 39 int ec; in gelf_getcap() local 57 ec = e->e_class; in gelf_getcap() 58 assert(ec == ELFCLASS32 || ec == ELFCLASS64); in gelf_getcap() 60 if (ec == ELFCLASS32) in gelf_getcap() 70 if ((msz = _libelf_msize(ELF_T_CAP, ec, e->e_version)) == 0) in gelf_getcap() 78 if (ec == ELFCLASS32) { in gelf_getcap() 98 int ec; in gelf_update_cap() local 116 ec = e->e_class; in gelf_update_cap() 117 assert(ec == ELFCLASS32 || ec == ELFCLASS64); in gelf_update_cap() 119 if (ec == ELFCLASS32) in gelf_update_cap() [all …]
|
| H A D | gelf_dyn.c | 39 int ec; in gelf_getdyn() local 57 ec = e->e_class; in gelf_getdyn() 58 assert(ec == ELFCLASS32 || ec == ELFCLASS64); in gelf_getdyn() 60 if (ec == ELFCLASS32) in gelf_getdyn() 70 if ((msz = _libelf_msize(ELF_T_DYN, ec, e->e_version)) == 0) in gelf_getdyn() 80 if (ec == ELFCLASS32) { in gelf_getdyn() 99 int ec; in gelf_update_dyn() local 117 ec = e->e_class; in gelf_update_dyn() 118 assert(ec == ELFCLASS32 || ec == ELFCLASS64); in gelf_update_dyn() 120 if (ec == ELFCLASS32) in gelf_update_dyn() [all …]
|
| H A D | elf_update.c | 114 int ec, elftype; in _libelf_compute_section_extents() local 123 ec = e->e_class; in _libelf_compute_section_extents() 127 if (ec == ELFCLASS32) { in _libelf_compute_section_extents() 150 sh_align = _libelf_falign(elftype, ec); in _libelf_compute_section_extents() 227 if ((msz = _libelf_msize(d->d_type, ec, e->e_version)) == 0) in _libelf_compute_section_extents() 259 fsz = _libelf_fsize(d->d_type, ec, d->d_version, in _libelf_compute_section_extents() 282 sh_offset % _libelf_falign(elftype, ec)) { in _libelf_compute_section_extents() 305 (sh_entsize = _libelf_fsize(elftype, ec, e->e_version, in _libelf_compute_section_extents() 321 if (ec == ELFCLASS32) { in _libelf_compute_section_extents() 450 int ec; in _libelf_resync_sections() local [all …]
|
| H A D | gelf_move.c | 39 int ec; in gelf_getmove() local 57 ec = e->e_class; in gelf_getmove() 58 assert(ec == ELFCLASS32 || ec == ELFCLASS64); in gelf_getmove() 60 if (ec == ELFCLASS32) in gelf_getmove() 70 if ((msz = _libelf_msize(ELF_T_MOVE, ec, e->e_version)) == 0) in gelf_getmove() 80 if (ec == ELFCLASS32) { in gelf_getmove() 102 int ec; in gelf_update_move() local 120 ec = e->e_class; in gelf_update_move() 121 assert(ec == ELFCLASS32 || ec == ELFCLASS64); in gelf_update_move() 123 if (ec == ELFCLASS32) in gelf_update_move() [all …]
|
| H A D | gelf_rel.c | 39 int ec; in gelf_getrel() local 57 ec = e->e_class; in gelf_getrel() 58 assert(ec == ELFCLASS32 || ec == ELFCLASS64); in gelf_getrel() 60 if (ec == ELFCLASS32) in gelf_getrel() 70 if ((msz = _libelf_msize(ELF_T_REL, ec, e->e_version)) == 0) in gelf_getrel() 80 if (ec == ELFCLASS32) { in gelf_getrel() 101 int ec; in gelf_update_rel() local 119 ec = e->e_class; in gelf_update_rel() 120 assert(ec == ELFCLASS32 || ec == ELFCLASS64); in gelf_update_rel() 122 if (ec == ELFCLASS32) in gelf_update_rel() [all …]
|
| H A D | gelf_sym.c | 39 int ec; in gelf_getsym() local 57 ec = e->e_class; in gelf_getsym() 58 assert(ec == ELFCLASS32 || ec == ELFCLASS64); in gelf_getsym() 60 if (ec == ELFCLASS32) in gelf_getsym() 70 if ((msz = _libelf_msize(ELF_T_SYM, ec, e->e_version)) == 0) in gelf_getsym() 80 if (ec == ELFCLASS32) { in gelf_getsym() 101 int ec; in gelf_update_sym() local 119 ec = e->e_class; in gelf_update_sym() 120 assert(ec == ELFCLASS32 || ec == ELFCLASS64); in gelf_update_sym() 122 if (ec == ELFCLASS32) in gelf_update_sym() [all …]
|
| H A D | gelf_rela.c | 39 int ec; in gelf_getrela() local 57 ec = e->e_class; in gelf_getrela() 58 assert(ec == ELFCLASS32 || ec == ELFCLASS64); in gelf_getrela() 60 if (ec == ELFCLASS32) in gelf_getrela() 70 if ((msz = _libelf_msize(ELF_T_RELA, ec, e->e_version)) == 0) in gelf_getrela() 80 if (ec == ELFCLASS32) { in gelf_getrela() 102 int ec; in gelf_update_rela() local 120 ec = e->e_class; in gelf_update_rela() 121 assert(ec == ELFCLASS32 || ec == ELFCLASS64); in gelf_update_rela() 123 if (ec == ELFCLASS32) in gelf_update_rela() [all …]
|
| H A D | gelf_ehdr.c | 53 int ec; in gelf_getehdr() local 58 ((ec = e->e_class) != ELFCLASS32 && ec != ELFCLASS64)) { in gelf_getehdr() 63 if (ec == ELFCLASS32) { in gelf_getehdr() 86 assert(ec == ELFCLASS64); in gelf_getehdr() 108 gelf_newehdr(Elf *e, int ec) in gelf_newehdr() argument 111 (ec == ELFCLASS32 || ec == ELFCLASS64)) in gelf_newehdr() 112 return (_libelf_ehdr(e, ec, 1)); in gelf_newehdr() 121 int ec; in gelf_update_ehdr() local 127 ((ec = e->e_class) != ELFCLASS32 && ec != ELFCLASS64)) { in gelf_update_ehdr() 137 if ((ehdr = _libelf_ehdr(e, ec, 0)) == NULL) in gelf_update_ehdr() [all …]
|
| H A D | elf_shstrndx.c | 38 int ec; in _libelf_getshdrstrndx() local 41 ((ec = e->e_class) != ELFCLASS32 && ec != ELFCLASS64)) { in _libelf_getshdrstrndx() 46 if ((eh = _libelf_ehdr(e, ec, 0)) == NULL) in _libelf_getshdrstrndx() 70 int ec; in elf_setshstrndx() local 73 ((ec = e->e_class) != ELFCLASS32 && ec != ELFCLASS64) || in elf_setshstrndx() 74 ((eh = _libelf_ehdr(e, ec, 0)) == NULL)) { in elf_setshstrndx() 79 return (_libelf_setshstrndx(e, eh, ec, strndx)); in elf_setshstrndx()
|
| H A D | gelf_symshndx.c | 38 int ec; in gelf_getsymshndx() local 58 ec = e->e_class; in gelf_getsymshndx() 59 assert(ec == ELFCLASS32 || ec == ELFCLASS64); in gelf_getsymshndx() 61 if (ec == ELFCLASS32) in gelf_getsymshndx() 72 if ((msz = _libelf_msize(ELF_T_WORD, ec, e->e_version)) == 0) in gelf_getsymshndx() 91 int ec; in gelf_update_symshndx() local 110 ec = e->e_class; in gelf_update_symshndx() 111 assert(ec == ELFCLASS32 || ec == ELFCLASS64); in gelf_update_symshndx() 113 if (ec == ELFCLASS32) in gelf_update_symshndx() 124 if ((msz = _libelf_msize(ELF_T_WORD, ec, e->e_version)) == 0) in gelf_update_symshndx()
|
| H A D | libelf_ehdr.c | 41 _libelf_load_extended(Elf *e, int ec, uint64_t shoff, uint16_t phnum, in _libelf_load_extended() argument 51 fsz = _libelf_fsize(ELF_T_SHDR, ec, e->e_version, 1); in _libelf_load_extended() 67 xlator = _libelf_get_translator(ELF_T_SHDR, ELF_TOMEMORY, ec, in _libelf_load_extended() 73 #define GET_SHDR_MEMBER(M) ((ec == ELFCLASS32) ? scn->s_shdr.s_shdr32.M : \ in _libelf_load_extended() 106 _libelf_ehdr(Elf *e, int ec, int allocate) in _libelf_ehdr() argument 115 assert(ec == ELFCLASS32 || ec == ELFCLASS64); in _libelf_ehdr() 122 if (e->e_class != ELFCLASSNONE && e->e_class != ec) { in _libelf_ehdr() 133 e->e_class = ec; in _libelf_ehdr() 135 if (ec == ELFCLASS32) in _libelf_ehdr() 143 fsz = _libelf_fsize(ELF_T_EHDR, ec, e->e_version, (size_t) 1); in _libelf_ehdr() [all …]
|
| H A D | elf_scn.c | 51 int ec, swapbytes; in _libelf_load_section_headers() local 71 ec = e->e_class; in _libelf_load_section_headers() 72 fsz = _libelf_fsize(ELF_T_SHDR, ec, e->e_version, (size_t) 1); in _libelf_load_section_headers() 77 if (ec == ELFCLASS32) { in _libelf_load_section_headers() 87 xlator = _libelf_get_translator(ELF_T_SHDR, ELF_TOMEMORY, ec, in _libelf_load_section_headers() 114 if (ec == ELFCLASS32) { in _libelf_load_section_headers() 134 int ec; in elf_getscn() local 139 ((ec = e->e_class) != ELFCLASS32 && ec != ELFCLASS64)) { in elf_getscn() 144 if ((ehdr = _libelf_ehdr(e, ec, 0)) == NULL) in elf_getscn() 173 int ec; in elf_newscn() local [all …]
|
| /openbsd-src/sys/arch/armv7/exynos/ |
| H A D | exgpio.c | 146 struct exgpio_controller *ec; in exgpio_attach() local 178 ec = malloc(sizeof(*ec), M_DEVBUF, M_WAITOK); in exgpio_attach() 179 ec->ec_bank = exgpio_bank(sc, name); in exgpio_attach() 180 ec->ec_sc = sc; in exgpio_attach() 181 ec->ec_gc.gc_node = node; in exgpio_attach() 182 ec->ec_gc.gc_cookie = ec; in exgpio_attach() 183 ec->ec_gc.gc_config_pin = exgpio_config_pin; in exgpio_attach() 184 ec->ec_gc.gc_get_pin = exgpio_get_pin; in exgpio_attach() 185 ec->ec_gc.gc_set_pin = exgpio_set_pin; in exgpio_attach() 186 gpio_controller_register(&ec->ec_gc); in exgpio_attach() [all …]
|
| /openbsd-src/gnu/llvm/libcxx/include/ |
| H A D | filesystem | 175 directory_entry(const filesystem::path& p, error_code& ec); 182 void assign(const filesystem::path& p, error_code& ec); 184 void replace_filename(const filesystem::path& p, error_code& ec); 186 void refresh(error_code& ec) noexcept; 191 bool exists(error_code& ec) const noexcept; 193 bool is_block_file(error_code& ec) const noexcept; 195 bool is_character_file(error_code& ec) const noexcept; 197 bool is_directory(error_code& ec) const noexcept; 199 bool is_fifo(error_code& ec) const noexcept; 201 bool is_other(error_code& ec) const noexcept; [all …]
|
| /openbsd-src/gnu/usr.bin/perl/dist/ExtUtils-CBuilder/t/ |
| H A D | 02-link.t | 67 my $ec = my_system($exe_file); 68 is( $ec, 11, "got expected exit code from executable" ) 69 or diag( $ec == -1 ? "Could not run '$exe_file': $!\n" 70 : "Unexpected exit code '$ec'\n"); 86 my $ec; 90 $ec = system("mcr $cmd"); 91 return $ec; 94 $ec = system($cmd); 95 return $ec == -1 ? -1 : $ec >> 8;
|
| /openbsd-src/lib/libfido2/src/ |
| H A D | es256.c | 226 const EC_KEY *ec; in es256_sk_create() local 245 if ((ec = EVP_PKEY_get0_EC_KEY(k)) == NULL || in es256_sk_create() 246 (d = EC_KEY_get0_private_key(ec)) == NULL || in es256_sk_create() 271 EC_KEY *ec = NULL; in es256_pk_to_EVP_PKEY() local 294 if ((ec = EC_KEY_new_by_curve_name(es256_nid)) == NULL || in es256_pk_to_EVP_PKEY() 295 (g = EC_KEY_get0_group(ec)) == NULL) { in es256_pk_to_EVP_PKEY() 302 EC_KEY_set_public_key(ec, q) == 0) { in es256_pk_to_EVP_PKEY() 308 EVP_PKEY_assign_EC_KEY(pkey, ec) == 0) { in es256_pk_to_EVP_PKEY() 313 ec = NULL; /* at this point, ec belongs to evp */ in es256_pk_to_EVP_PKEY() 322 if (ec != NULL) in es256_pk_to_EVP_PKEY() [all …]
|
| /openbsd-src/lib/libcrypto/ec/ |
| H A D | ec_pmeth.c | 64 #include <openssl/ec.h> 169 EC_KEY *ec = ctx->pkey->pkey.ec; in pkey_ec_sign() 172 *siglen = ECDSA_size(ec); in pkey_ec_sign() 174 } else if (*siglen < (size_t) ECDSA_size(ec)) { in pkey_ec_sign() 183 ret = ECDSA_sign(type, tbs, tbslen, sig, &sltmp, ec); in pkey_ec_sign() 197 EC_KEY *ec = ctx->pkey->pkey.ec; in pkey_ec_verify() 204 ret = ECDSA_verify(type, tbs, tbslen, sig, siglen, ec); in pkey_ec_verify() 223 eckey = dctx->co_key ? dctx->co_key : ctx->pkey->pkey.ec; in pkey_ec_derive() 168 EC_KEY *ec = ctx->pkey->pkey.ec; pkey_ec_sign() local 196 EC_KEY *ec = ctx->pkey->pkey.ec; pkey_ec_verify() local 458 EC_KEY *ec = NULL; pkey_ec_paramgen() local 486 EC_KEY *ec = NULL; pkey_ec_keygen() local [all...] |
| /openbsd-src/usr.bin/mandoc/ |
| H A D | dba_array.c | 36 int32_t ec; /* Currently active entry. */ member 53 array->ec = 0; in dba_array_new() 113 array->ec = array->eu; in dba_array_start() 119 if (array->ec < array->eu) in dba_array_next() 120 array->ec++; in dba_array_next() 122 array->ec = 0; in dba_array_next() 123 while (array->ec < array->eu && array->em[array->ec] == -1) in dba_array_next() 124 array->ec++; in dba_array_next() 125 return array->ec < array->eu ? array->ep[array->ec] : NULL; in dba_array_next() 131 if (array->ec < array->eu && array->em[array->ec] != -1) { in dba_array_del() [all …]
|
| /openbsd-src/gnu/llvm/libcxx/src/ |
| H A D | mutex.cpp | 38 int ec = __libcpp_mutex_lock(&__m_); in lock() local 39 if (ec) in lock() 40 __throw_system_error(ec, "mutex lock failed"); in lock() 52 int ec = __libcpp_mutex_unlock(&__m_); in unlock() local 53 (void)ec; in unlock() 54 _LIBCPP_ASSERT(ec == 0, "call to mutex::unlock failed"); in unlock() 61 int ec = __libcpp_recursive_mutex_init(&__m_); in recursive_mutex() local 62 if (ec) in recursive_mutex() 63 __throw_system_error(ec, "recursive_mutex constructor failed"); in recursive_mutex() 76 int ec = __libcpp_recursive_mutex_lock(&__m_); in lock() local [all …]
|