#include <linux/blk-crypto-profile.h>
#include "blk-crypto-internal.h"
struct blk_crypto_kobj { … };
struct blk_crypto_attr { … };
static struct blk_crypto_profile *kobj_to_crypto_profile(struct kobject *kobj)
{ … }
static struct blk_crypto_attr *attr_to_crypto_attr(struct attribute *attr)
{ … }
static ssize_t max_dun_bits_show(struct blk_crypto_profile *profile,
struct blk_crypto_attr *attr, char *page)
{ … }
static ssize_t num_keyslots_show(struct blk_crypto_profile *profile,
struct blk_crypto_attr *attr, char *page)
{ … }
#define BLK_CRYPTO_RO_ATTR(_name) …
BLK_CRYPTO_RO_ATTR(…);
BLK_CRYPTO_RO_ATTR(…);
static struct attribute *blk_crypto_attrs[] = …;
static const struct attribute_group blk_crypto_attr_group = …;
static struct blk_crypto_attr __blk_crypto_mode_attrs[BLK_ENCRYPTION_MODE_MAX];
static struct attribute *blk_crypto_mode_attrs[BLK_ENCRYPTION_MODE_MAX + 1];
static umode_t blk_crypto_mode_is_visible(struct kobject *kobj,
struct attribute *attr, int n)
{ … }
static ssize_t blk_crypto_mode_show(struct blk_crypto_profile *profile,
struct blk_crypto_attr *attr, char *page)
{ … }
static const struct attribute_group blk_crypto_modes_attr_group = …;
static const struct attribute_group *blk_crypto_attr_groups[] = …;
static ssize_t blk_crypto_attr_show(struct kobject *kobj,
struct attribute *attr, char *page)
{ … }
static const struct sysfs_ops blk_crypto_attr_ops = …;
static void blk_crypto_release(struct kobject *kobj)
{ … }
static const struct kobj_type blk_crypto_ktype = …;
int blk_crypto_sysfs_register(struct gendisk *disk)
{ … }
void blk_crypto_sysfs_unregister(struct gendisk *disk)
{ … }
static int __init blk_crypto_sysfs_init(void)
{ … }
subsys_initcall(blk_crypto_sysfs_init);