Skip to content

Commit 1a166df

Browse files
committed
Fix typos in the post #1
Signed-off-by: Elmurod Talipov <elmurod.talipov@gmail.com>
1 parent 8e5fed7 commit 1a166df

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

_posts/2019-12-30-kernel-crypto-api-message-digest.markdown

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,13 @@ static ssize_t kcv_store(struct kobject *kobj, struct kobj_attribute *attr, cons
9696
static struct kobj_attribute kcv_attribute = __ATTR(value, 0644, kcv_show, kcv_store);
9797
```
9898

99-
To create a single file attribute we are going to use sysfs_create_file.
99+
To create a single file attribute we are going to use ``sysfs_create_file`` function.
100100

101101
```c
102102
int sysfs_create_file (struct kobject * kobj, const struct attribute *attr);
103103
```
104104
105-
Where, ``kobj`` – object we’re creating for, ``attr`` – attribute descriptor.
106-
One can use another function ``sysfs_create_group`` to create a group of attributes.
105+
Where, ``kobj`` is object we’re creating for, ``attr`` is attribute descriptor. One can use another function ``sysfs_create_group`` to create a group of attributes.
107106
Once you have done with sysfs file, you should delete this file using ``sysfs_remove_file`` which has same prototype.
108107
109108
We are going to create ``sysfs`` directory and file during module initialization and remove then when module is removed.
@@ -239,14 +238,14 @@ root@sapi:~$ cat /sys/kernel/kcv/value
239238
0ba904eae8773b70c75333db4de2f3ac45a8ad4ddba1b242f0b3cfc199391dd8
240239
```
241240

242-
Let's verify result with userspace ``sha25sum`` tool. It indeed matches.
241+
Let's verify result with userspace ``sha256sum`` tool. It indeed matches.
243242
```sh
244243
root@sapi:~$ echo "Hello world!" | sha256sum
245244
0ba904eae8773b70c75333db4de2f3ac45a8ad4ddba1b242f0b3cfc199391dd8 -
246245
```
247246

248247
### Full Sample Code
249-
248+
You need to save following module code, and aforemenioned Makefile as file to build and test.
250249
```c
251250
/*
252251
* Copyright (C) 2019 Elmurod Talipov <elmurod.talipov@gmail.com>

0 commit comments

Comments
 (0)