/external/e2fsprogs/e2fsck/ |
D | e2fsck.c | 54 errcode_t e2fsck_reset_context(e2fsck_t ctx) in e2fsck_reset_context() argument 58 ctx->flags &= E2F_RESET_FLAGS; in e2fsck_reset_context() 59 ctx->lost_and_found = 0; in e2fsck_reset_context() 60 ctx->bad_lost_and_found = 0; in e2fsck_reset_context() 61 if (ctx->inode_used_map) { in e2fsck_reset_context() 62 ext2fs_free_inode_bitmap(ctx->inode_used_map); in e2fsck_reset_context() 63 ctx->inode_used_map = 0; in e2fsck_reset_context() 65 if (ctx->inode_dir_map) { in e2fsck_reset_context() 66 ext2fs_free_inode_bitmap(ctx->inode_dir_map); in e2fsck_reset_context() 67 ctx->inode_dir_map = 0; in e2fsck_reset_context() [all …]
|
D | unix.c | 77 static void usage(e2fsck_t ctx) in usage() argument 84 ctx->program_name); in usage() 104 static void show_stats(e2fsck_t ctx) in show_stats() argument 106 ext2_filsys fs = ctx->fs; in show_stats() 114 dir_links = 2 * ctx->fs_directory_count - 1; in show_stats() 115 num_files = ctx->fs_total_count - dir_links; in show_stats() 116 num_links = ctx->fs_links_count - dir_links; in show_stats() 124 frag_percent_file = (10000 * ctx->fs_fragmented) / inodes_used; in show_stats() 127 frag_percent_dir = (10000 * ctx->fs_fragmented_dir) / inodes_used; in show_stats() 130 frag_percent_total = ((10000 * (ctx->fs_fragmented + in show_stats() [all …]
|
D | dx_dirinfo.c | 16 void e2fsck_add_dx_dir(e2fsck_t ctx, ext2_ino_t ino, int num_blocks) in e2fsck_add_dx_dir() argument 26 if (!ctx->dx_dir_info) { in e2fsck_add_dx_dir() 27 ctx->dx_dir_info_count = 0; in e2fsck_add_dx_dir() 28 ctx->dx_dir_info_size = 100; /* Guess */ in e2fsck_add_dx_dir() 29 ctx->dx_dir_info = (struct dx_dir_info *) in e2fsck_add_dx_dir() 30 e2fsck_allocate_memory(ctx, ctx->dx_dir_info_size in e2fsck_add_dx_dir() 35 if (ctx->dx_dir_info_count >= ctx->dx_dir_info_size) { in e2fsck_add_dx_dir() 36 old_size = ctx->dx_dir_info_size * sizeof(struct dx_dir_info); in e2fsck_add_dx_dir() 37 ctx->dx_dir_info_size += 10; in e2fsck_add_dx_dir() 38 retval = ext2fs_resize_mem(old_size, ctx->dx_dir_info_size * in e2fsck_add_dx_dir() [all …]
|
D | pass3.c | 44 static void check_root(e2fsck_t ctx); 45 static int check_directory(e2fsck_t ctx, ext2_ino_t ino, 47 static void fix_dotdot(e2fsck_t ctx, ext2_ino_t ino, ext2_ino_t parent); 52 void e2fsck_pass3(e2fsck_t ctx) in e2fsck_pass3() argument 54 ext2_filsys fs = ctx->fs; in e2fsck_pass3() 63 init_resource_track(&rtrack, ctx->fs->io); in e2fsck_pass3() 70 if (!(ctx->options & E2F_OPT_PREEN)) in e2fsck_pass3() 71 fix_problem(ctx, PR_3_PASS_HEADER, &pctx); in e2fsck_pass3() 80 fix_problem(ctx, PR_3_ALLOCATE_IBITMAP_ERROR, &pctx); in e2fsck_pass3() 81 ctx->flags |= E2F_FLAG_ABORT; in e2fsck_pass3() [all …]
|
/external/openssl/crypto/evp/ |
D | pmeth_fn.c | 66 #define M_check_autoarg(ctx, arg, arglen, err) \ argument 67 if (ctx->pmeth->flags & EVP_PKEY_FLAG_AUTOARGLEN) \ 69 size_t pksize = (size_t)EVP_PKEY_size(ctx->pkey); \ 82 int EVP_PKEY_sign_init(EVP_PKEY_CTX *ctx) in EVP_PKEY_sign_init() argument 85 if (!ctx || !ctx->pmeth || !ctx->pmeth->sign) in EVP_PKEY_sign_init() 91 ctx->operation = EVP_PKEY_OP_SIGN; in EVP_PKEY_sign_init() 92 if (!ctx->pmeth->sign_init) in EVP_PKEY_sign_init() 94 ret = ctx->pmeth->sign_init(ctx); in EVP_PKEY_sign_init() 96 ctx->operation = EVP_PKEY_OP_UNDEFINED; in EVP_PKEY_sign_init() 100 int EVP_PKEY_sign(EVP_PKEY_CTX *ctx, in EVP_PKEY_sign() argument [all …]
|
D | bio_b64.c | 114 BIO_B64_CTX *ctx; in b64_new() local 116 ctx=(BIO_B64_CTX *)OPENSSL_malloc(sizeof(BIO_B64_CTX)); in b64_new() 117 if (ctx == NULL) return(0); in b64_new() 119 ctx->buf_len=0; in b64_new() 120 ctx->tmp_len=0; in b64_new() 121 ctx->tmp_nl=0; in b64_new() 122 ctx->buf_off=0; in b64_new() 123 ctx->cont=1; in b64_new() 124 ctx->start=1; in b64_new() 125 ctx->encode=0; in b64_new() [all …]
|
D | bio_ok.c | 179 BIO_OK_CTX *ctx; in ok_new() local 181 ctx=(BIO_OK_CTX *)OPENSSL_malloc(sizeof(BIO_OK_CTX)); in ok_new() 182 if (ctx == NULL) return(0); in ok_new() 184 ctx->buf_len=0; in ok_new() 185 ctx->buf_off=0; in ok_new() 186 ctx->buf_len_save=0; in ok_new() 187 ctx->buf_off_save=0; in ok_new() 188 ctx->cont=1; in ok_new() 189 ctx->finished=0; in ok_new() 190 ctx->blockout= 0; in ok_new() [all …]
|
D | digest.c | 124 void EVP_MD_CTX_init(EVP_MD_CTX *ctx) in EVP_MD_CTX_init() argument 126 memset(ctx,'\0',sizeof *ctx); in EVP_MD_CTX_init() 131 EVP_MD_CTX *ctx=OPENSSL_malloc(sizeof *ctx); in EVP_MD_CTX_create() local 133 if (ctx) in EVP_MD_CTX_create() 134 EVP_MD_CTX_init(ctx); in EVP_MD_CTX_create() 136 return ctx; in EVP_MD_CTX_create() 139 int EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type) in EVP_DigestInit() argument 141 EVP_MD_CTX_init(ctx); in EVP_DigestInit() 142 return EVP_DigestInit_ex(ctx, type, NULL); in EVP_DigestInit() 145 int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl) in EVP_DigestInit_ex() argument [all …]
|
D | evp_enc.c | 73 #define M_do_cipher(ctx, out, in, inl) FIPS_cipher(ctx, out, in, inl) argument 75 #define M_do_cipher(ctx, out, in, inl) ctx->cipher->do_cipher(ctx, out, in, inl) argument 81 void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *ctx) in EVP_CIPHER_CTX_init() argument 83 memset(ctx,0,sizeof(EVP_CIPHER_CTX)); in EVP_CIPHER_CTX_init() 89 EVP_CIPHER_CTX *ctx=OPENSSL_malloc(sizeof *ctx); in EVP_CIPHER_CTX_new() local 90 if (ctx) in EVP_CIPHER_CTX_new() 91 EVP_CIPHER_CTX_init(ctx); in EVP_CIPHER_CTX_new() 92 return ctx; in EVP_CIPHER_CTX_new() 95 int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, in EVP_CipherInit() argument 99 EVP_CIPHER_CTX_init(ctx); in EVP_CipherInit() [all …]
|
D | bio_enc.c | 110 BIO_ENC_CTX *ctx; in enc_new() local 112 ctx=(BIO_ENC_CTX *)OPENSSL_malloc(sizeof(BIO_ENC_CTX)); in enc_new() 113 if (ctx == NULL) return(0); in enc_new() 114 EVP_CIPHER_CTX_init(&ctx->cipher); in enc_new() 116 ctx->buf_len=0; in enc_new() 117 ctx->buf_off=0; in enc_new() 118 ctx->cont=1; in enc_new() 119 ctx->finished=0; in enc_new() 120 ctx->ok=1; in enc_new() 123 bi->ptr=(char *)ctx; in enc_new() [all …]
|
D | e_des3.c | 70 static int des_ede_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, 73 static int des_ede3_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, 85 #define data(ctx) ((DES_EDE_KEY *)(ctx)->cipher_data) argument 89 static int des_ede_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, in des_ede_ecb_cipher() argument 95 &data(ctx)->ks1, &data(ctx)->ks2, in des_ede_ecb_cipher() 96 &data(ctx)->ks3, in des_ede_ecb_cipher() 97 ctx->encrypt); in des_ede_ecb_cipher() 101 static int des_ede_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, in des_ede_ofb_cipher() argument 107 &data(ctx)->ks1, &data(ctx)->ks2, &data(ctx)->ks3, in des_ede_ofb_cipher() 108 (DES_cblock *)ctx->iv, &ctx->num); in des_ede_ofb_cipher() [all …]
|
D | pmeth_gn.c | 67 int EVP_PKEY_paramgen_init(EVP_PKEY_CTX *ctx) in EVP_PKEY_paramgen_init() argument 70 if (!ctx || !ctx->pmeth || !ctx->pmeth->paramgen) in EVP_PKEY_paramgen_init() 76 ctx->operation = EVP_PKEY_OP_PARAMGEN; in EVP_PKEY_paramgen_init() 77 if (!ctx->pmeth->paramgen_init) in EVP_PKEY_paramgen_init() 79 ret = ctx->pmeth->paramgen_init(ctx); in EVP_PKEY_paramgen_init() 81 ctx->operation = EVP_PKEY_OP_UNDEFINED; in EVP_PKEY_paramgen_init() 85 int EVP_PKEY_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey) in EVP_PKEY_paramgen() argument 88 if (!ctx || !ctx->pmeth || !ctx->pmeth->paramgen) in EVP_PKEY_paramgen() 95 if (ctx->operation != EVP_PKEY_OP_PARAMGEN) in EVP_PKEY_paramgen() 107 ret = ctx->pmeth->paramgen(ctx, *ppkey); in EVP_PKEY_paramgen() [all …]
|
/external/openssl/crypto/x509/ |
D | x509_vfy.c | 112 static int check_issued(X509_STORE_CTX *ctx, X509 *x, X509 *issuer); 113 static X509 *find_issuer(X509_STORE_CTX *ctx, STACK_OF(X509) *sk, X509 *x); 114 static int check_chain_extensions(X509_STORE_CTX *ctx); 115 static int check_name_constraints(X509_STORE_CTX *ctx); 116 static int check_trust(X509_STORE_CTX *ctx); 117 static int check_revocation(X509_STORE_CTX *ctx); 118 static int check_cert(X509_STORE_CTX *ctx); 119 static int check_policy(X509_STORE_CTX *ctx); 121 static int get_crl_score(X509_STORE_CTX *ctx, X509 **pissuer, 124 static int get_crl_delta(X509_STORE_CTX *ctx, [all …]
|
/external/openssl/crypto/jpake/ |
D | jpake.c | 28 BN_CTX *ctx; member 74 static void JPAKE_CTX_init(JPAKE_CTX *ctx, const char *name, in JPAKE_CTX_init() argument 79 ctx->p.name = OPENSSL_strdup(name); in JPAKE_CTX_init() 80 ctx->p.peer_name = OPENSSL_strdup(peer_name); in JPAKE_CTX_init() 81 ctx->p.p = BN_dup(p); in JPAKE_CTX_init() 82 ctx->p.g = BN_dup(g); in JPAKE_CTX_init() 83 ctx->p.q = BN_dup(q); in JPAKE_CTX_init() 84 ctx->secret = BN_dup(secret); in JPAKE_CTX_init() 86 ctx->p.gxc = BN_new(); in JPAKE_CTX_init() 87 ctx->p.gxd = BN_new(); in JPAKE_CTX_init() [all …]
|
/external/openssl/crypto/modes/ |
D | ccm128.c | 63 void CRYPTO_ccm128_init(CCM128_CONTEXT *ctx, in CRYPTO_ccm128_init() argument 66 memset(ctx->nonce.c,0,sizeof(ctx->nonce.c)); in CRYPTO_ccm128_init() 67 ctx->nonce.c[0] = ((u8)(L-1)&7) | (u8)(((M-2)/2)&7)<<3; in CRYPTO_ccm128_init() 68 ctx->blocks = 0; in CRYPTO_ccm128_init() 69 ctx->block = block; in CRYPTO_ccm128_init() 70 ctx->key = key; in CRYPTO_ccm128_init() 76 int CRYPTO_ccm128_setiv(CCM128_CONTEXT *ctx, in CRYPTO_ccm128_setiv() argument 79 unsigned int L = ctx->nonce.c[0]&7; /* the L parameter */ in CRYPTO_ccm128_setiv() 84 ctx->nonce.c[8] = (u8)(mlen>>(56%(sizeof(mlen)*8))); in CRYPTO_ccm128_setiv() 85 ctx->nonce.c[9] = (u8)(mlen>>(48%(sizeof(mlen)*8))); in CRYPTO_ccm128_setiv() [all …]
|
/external/e2fsprogs/lib/ext2fs/ |
D | block.c | 39 #define check_for_ro_violation_return(ctx, ret) \ argument 41 if (((ctx)->flags & BLOCK_FLAG_READ_ONLY) && \ 43 (ctx)->errcode = EXT2_ET_RO_BLOCK_ITERATE; \ 49 #define check_for_ro_violation_goto(ctx, ret, label) \ argument 51 if (((ctx)->flags & BLOCK_FLAG_READ_ONLY) && \ 53 (ctx)->errcode = EXT2_ET_RO_BLOCK_ITERATE; \ 60 int ref_offset, struct block_context *ctx) in block_iterate_ind() argument 66 limit = ctx->fs->blocksize >> 2; in block_iterate_ind() 67 if (!(ctx->flags & BLOCK_FLAG_DEPTH_TRAVERSE) && in block_iterate_ind() 68 !(ctx->flags & BLOCK_FLAG_DATA_ONLY)) in block_iterate_ind() [all …]
|
/external/libusb_aah/libusb/ |
D | io.c | 1132 int usbi_io_init(struct libusb_context *ctx) in usbi_io_init() argument 1136 usbi_mutex_init(&ctx->flying_transfers_lock, NULL); in usbi_io_init() 1137 usbi_mutex_init(&ctx->pollfds_lock, NULL); in usbi_io_init() 1138 usbi_mutex_init(&ctx->pollfd_modify_lock, NULL); in usbi_io_init() 1139 usbi_mutex_init_recursive(&ctx->events_lock, NULL); in usbi_io_init() 1140 usbi_mutex_init(&ctx->event_waiters_lock, NULL); in usbi_io_init() 1141 usbi_cond_init(&ctx->event_waiters_cond, NULL); in usbi_io_init() 1142 list_init(&ctx->flying_transfers); in usbi_io_init() 1143 list_init(&ctx->pollfds); in usbi_io_init() 1146 r = usbi_pipe(ctx->ctrl_pipe); in usbi_io_init() [all …]
|
/external/openssl/crypto/cmac/ |
D | cmac.c | 99 CMAC_CTX *ctx; in CMAC_CTX_new() local 100 ctx = OPENSSL_malloc(sizeof(CMAC_CTX)); in CMAC_CTX_new() 101 if (!ctx) in CMAC_CTX_new() 103 EVP_CIPHER_CTX_init(&ctx->cctx); in CMAC_CTX_new() 104 ctx->nlast_block = -1; in CMAC_CTX_new() 105 return ctx; in CMAC_CTX_new() 108 void CMAC_CTX_cleanup(CMAC_CTX *ctx) in CMAC_CTX_cleanup() argument 111 if (FIPS_mode() && !ctx->cctx.engine) in CMAC_CTX_cleanup() 113 FIPS_cmac_ctx_cleanup(ctx); in CMAC_CTX_cleanup() 117 EVP_CIPHER_CTX_cleanup(&ctx->cctx); in CMAC_CTX_cleanup() [all …]
|
/external/openssl/crypto/bio/ |
D | bf_buff.c | 95 BIO_F_BUFFER_CTX *ctx; in buffer_new() local 97 ctx=(BIO_F_BUFFER_CTX *)OPENSSL_malloc(sizeof(BIO_F_BUFFER_CTX)); in buffer_new() 98 if (ctx == NULL) return(0); in buffer_new() 99 ctx->ibuf=(char *)OPENSSL_malloc(DEFAULT_BUFFER_SIZE); in buffer_new() 100 if (ctx->ibuf == NULL) { OPENSSL_free(ctx); return(0); } in buffer_new() 101 ctx->obuf=(char *)OPENSSL_malloc(DEFAULT_BUFFER_SIZE); in buffer_new() 102 if (ctx->obuf == NULL) { OPENSSL_free(ctx->ibuf); OPENSSL_free(ctx); return(0); } in buffer_new() 103 ctx->ibuf_size=DEFAULT_BUFFER_SIZE; in buffer_new() 104 ctx->obuf_size=DEFAULT_BUFFER_SIZE; in buffer_new() 105 ctx->ibuf_len=0; in buffer_new() [all …]
|
/external/openssh/ |
D | gss-genr.c | 50 ssh_gssapi_check_oid(Gssctxt *ctx, void *data, size_t len) in ssh_gssapi_check_oid() argument 52 return (ctx != NULL && ctx->oid != GSS_C_NO_OID && in ssh_gssapi_check_oid() 53 ctx->oid->length == len && in ssh_gssapi_check_oid() 54 memcmp(ctx->oid->elements, data, len) == 0); in ssh_gssapi_check_oid() 59 ssh_gssapi_set_oid_data(Gssctxt *ctx, void *data, size_t len) in ssh_gssapi_set_oid_data() argument 61 if (ctx->oid != GSS_C_NO_OID) { in ssh_gssapi_set_oid_data() 62 xfree(ctx->oid->elements); in ssh_gssapi_set_oid_data() 63 xfree(ctx->oid); in ssh_gssapi_set_oid_data() 65 ctx->oid = xmalloc(sizeof(gss_OID_desc)); in ssh_gssapi_set_oid_data() 66 ctx->oid->length = len; in ssh_gssapi_set_oid_data() [all …]
|
/external/libvpx/libvpx/vpx/src/ |
D | vpx_encoder.c | 21 #define SAVE_STATUS(ctx,var) (ctx?(ctx->err = var):var) argument 23 vpx_codec_err_t vpx_codec_enc_init_ver(vpx_codec_ctx_t *ctx, in vpx_codec_enc_init_ver() argument 33 else if (!ctx || !iface || !cfg) in vpx_codec_enc_init_ver() 49 ctx->iface = iface; in vpx_codec_enc_init_ver() 50 ctx->name = iface->name; in vpx_codec_enc_init_ver() 51 ctx->priv = NULL; in vpx_codec_enc_init_ver() 52 ctx->init_flags = flags; in vpx_codec_enc_init_ver() 53 ctx->config.enc = cfg; in vpx_codec_enc_init_ver() 54 res = ctx->iface->init(ctx, NULL); in vpx_codec_enc_init_ver() 58 ctx->err_detail = ctx->priv ? ctx->priv->err_detail : NULL; in vpx_codec_enc_init_ver() [all …]
|
D | vpx_decoder.c | 19 #define SAVE_STATUS(ctx,var) (ctx?(ctx->err = var):var) argument 21 vpx_codec_err_t vpx_codec_dec_init_ver(vpx_codec_ctx_t *ctx, in vpx_codec_dec_init_ver() argument 31 else if (!ctx || !iface) in vpx_codec_dec_init_ver() 49 memset(ctx, 0, sizeof(*ctx)); in vpx_codec_dec_init_ver() 50 ctx->iface = iface; in vpx_codec_dec_init_ver() 51 ctx->name = iface->name; in vpx_codec_dec_init_ver() 52 ctx->priv = NULL; in vpx_codec_dec_init_ver() 53 ctx->init_flags = flags; in vpx_codec_dec_init_ver() 54 ctx->config.dec = cfg; in vpx_codec_dec_init_ver() 59 res = ctx->iface->init(ctx, NULL); in vpx_codec_dec_init_ver() [all …]
|
/external/libusb/libusb/ |
D | io.c | 1004 int usbi_io_init(struct libusb_context *ctx) in usbi_io_init() argument 1008 pthread_mutex_init(&ctx->flying_transfers_lock, NULL); in usbi_io_init() 1009 pthread_mutex_init(&ctx->pollfds_lock, NULL); in usbi_io_init() 1010 pthread_mutex_init(&ctx->pollfd_modify_lock, NULL); in usbi_io_init() 1011 pthread_mutex_init(&ctx->events_lock, NULL); in usbi_io_init() 1012 pthread_mutex_init(&ctx->event_waiters_lock, NULL); in usbi_io_init() 1013 pthread_cond_init(&ctx->event_waiters_cond, NULL); in usbi_io_init() 1014 list_init(&ctx->flying_transfers); in usbi_io_init() 1015 list_init(&ctx->pollfds); in usbi_io_init() 1018 r = pipe(ctx->ctrl_pipe); in usbi_io_init() [all …]
|
/external/openssl/crypto/asn1/ |
D | bio_asn1.c | 122 static int asn1_bio_init(BIO_ASN1_BUF_CTX *ctx, int size); 123 static int asn1_bio_flush_ex(BIO *b, BIO_ASN1_BUF_CTX *ctx, 125 static int asn1_bio_setup_ex(BIO *b, BIO_ASN1_BUF_CTX *ctx, 152 BIO_ASN1_BUF_CTX *ctx; in asn1_bio_new() local 153 ctx = OPENSSL_malloc(sizeof(BIO_ASN1_BUF_CTX)); in asn1_bio_new() 154 if (!ctx) in asn1_bio_new() 156 if (!asn1_bio_init(ctx, DEFAULT_ASN1_BUF_SIZE)) in asn1_bio_new() 159 b->ptr = (char *)ctx; in asn1_bio_new() 164 static int asn1_bio_init(BIO_ASN1_BUF_CTX *ctx, int size) in asn1_bio_init() argument 166 ctx->buf = OPENSSL_malloc(size); in asn1_bio_init() [all …]
|
/external/wpa_supplicant_8/src/crypto/ |
D | crypto_internal.c | 34 struct crypto_hash *ctx; in crypto_hash_init() local 39 ctx = os_zalloc(sizeof(*ctx)); in crypto_hash_init() 40 if (ctx == NULL) in crypto_hash_init() 43 ctx->alg = alg; in crypto_hash_init() 47 MD5Init(&ctx->u.md5); in crypto_hash_init() 50 SHA1Init(&ctx->u.sha1); in crypto_hash_init() 54 sha256_init(&ctx->u.sha256); in crypto_hash_init() 59 MD5Init(&ctx->u.md5); in crypto_hash_init() 60 MD5Update(&ctx->u.md5, key, key_len); in crypto_hash_init() 61 MD5Final(tk, &ctx->u.md5); in crypto_hash_init() [all …]
|