Lines Matching defs:cd
420 struct crypt_device *cd,
434 assert(cd);
456 r = crypt_load(cd, CRYPT_TCRYPT, ¶ms);
465 return crypt_activate_by_volume_key(cd, name, NULL, 0, flags);
468 static int attach_luks_or_plain(struct crypt_device *cd,
477 assert(cd);
482 r = crypt_load(cd, CRYPT_LUKS1, NULL);
484 log_error("crypt_load() failed on device %s.\n", crypt_get_device_name(cd));
489 r = crypt_set_data_device(cd, data_device);
535 r = crypt_format(cd, CRYPT_PLAIN, cipher, cipher_mode, NULL, NULL, arg_keyfile_size, ¶ms);
545 crypt_get_cipher(cd),
546 crypt_get_cipher_mode(cd),
547 crypt_get_volume_key_size(cd)*8,
548 crypt_get_device_name(cd));
551 r = crypt_activate_by_keyfile_offset(cd, name, arg_key_slot, key_file, arg_keyfile_size, arg_keyfile_offset, flags);
561 r = crypt_activate_by_volume_key(cd, name, *p, arg_key_size, flags);
563 r = crypt_activate_by_passphrase(cd, name, arg_key_slot, *p, strlen(*p), flags);
586 struct crypt_device *cd = NULL;
640 k = crypt_init(&cd, arg_header);
642 k = crypt_init(&cd, argv[3]);
648 crypt_set_log_callback(cd, log_glue, NULL);
650 status = crypt_status(cd, argv[2]);
691 k = attach_tcrypt(cd, argv[2], key_file, passwords, flags);
693 k = attach_luks_or_plain(cd,
721 k = crypt_init_by_name(&cd, argv[2]);
727 crypt_set_log_callback(cd, log_glue, NULL);
729 k = crypt_deactivate(cd, argv[2]);
744 if (cd)
745 crypt_free(cd);