Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\test_objagg.c Create Date:2022-07-28 06:35:16
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:test_nodelta_obj_get

Proto:static int test_nodelta_obj_get(struct world *world, struct objagg *objagg, unsigned int key_id, bool should_create_root)

Type:int

Parameter:

TypeParameterName
struct world *world
struct objagg *objagg
unsigned intkey_id
boolshould_create_root
154  orig_root_count = root_count
159  If should_create_root Then prandom_bytes - get the requested number of pseudo-random bytes*@buf: where to copy the pseudo-random bytes to*@bytes: the requested number of bytes
163  objagg_obj = world_obj_get(world, objagg, key_id)
164  If IS_ERR(objagg_obj) Then
165  pr_err("Key %u: Failed to get object.\n", key_id)
166  Return PTR_ERR(objagg_obj)
168  If should_create_root Then
169  If root_count != orig_root_count + 1 Then
170  pr_err("Key %u: Root was not created\n", key_id)
171  err = -EINVAL
172  Go to err_check_root_count
174  Else
175  If root_count != orig_root_count Then
176  pr_err("Key %u: Root was incorrectly created\n", key_id)
178  err = -EINVAL
179  Go to err_check_root_count
182  root = objagg_obj_root_priv(objagg_obj)
183  If id != key_id Then
184  pr_err("Key %u: Root has unexpected key id\n", key_id)
185  err = -EINVAL
186  Go to err_check_key_id
188  If should_create_root && memcmp(next_root_buf, buf, size of buf ) Then
190  pr_err("Key %u: Buffer does not match the expected content\n", key_id)
192  err = -EINVAL
193  Go to err_check_buf
195  Return 0
197  err_check_buf :
198  err_check_key_id :
199  err_check_root_count :
200  objagg_obj_put(objagg, objagg_obj)
201  Return err
Caller
NameDescribe
test_nodelta