Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\sed-opal.c Create Date:2022-07-28 18:12:03
Last Modify:2020-03-17 23:36:33 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:add_user_to_lr

Proto:static int add_user_to_lr(struct opal_dev *dev, void *data)

Type:int

Parameter:

TypeParameterName
struct opal_dev *dev
void *data
1724  lkul = data
1727  memcpy(lr_buffer, opaluid[OPAL_LOCKINGRANGE_ACE_RDLOCKED], OPAL_UID_LENGTH)
1730  If l_state == 0010 Then memcpy(lr_buffer, opaluid[OPAL_LOCKINGRANGE_ACE_WRLOCKED], OPAL_UID_LENGTH)
1734  lr_buffer[7] = lr
1736  memcpy(user_uid, opaluid[OPAL_USER1_UID], OPAL_UID_LENGTH)
1738  user_uid[7] = who
1740  err = cmd_start(dev, lr_buffer, TCG Storage SSC Methods.* Derived from: TCG_Storage_Architecture_Core_Spec_v2.01_r1.00* Section: 6.3 Assigned UIDs[OPAL_SET])
1742  add_token_u8( & err, dev, OPAL_STARTNAME)
1743  add_token_u8( & err, dev, OPAL_VALUES)
1745  add_token_u8( & err, dev, OPAL_STARTLIST)
1746  add_token_u8( & err, dev, OPAL_STARTNAME)
1747  add_token_u8( & err, dev, 3)
1749  add_token_u8( & err, dev, OPAL_STARTLIST)
1752  add_token_u8( & err, dev, OPAL_STARTNAME)
1753  add_token_bytestring( & err, dev, opaluid[OPAL_HALF_UID_AUTHORITY_OBJ_REF], OPAL_UID_LENGTH / 2)
1756  add_token_bytestring( & err, dev, user_uid, OPAL_UID_LENGTH)
1757  add_token_u8( & err, dev, OPAL_ENDNAME)
1760  add_token_u8( & err, dev, OPAL_STARTNAME)
1761  add_token_bytestring( & err, dev, opaluid[OPAL_HALF_UID_AUTHORITY_OBJ_REF], OPAL_UID_LENGTH / 2)
1764  add_token_bytestring( & err, dev, user_uid, OPAL_UID_LENGTH)
1765  add_token_u8( & err, dev, OPAL_ENDNAME)
1768  add_token_u8( & err, dev, OPAL_STARTNAME)
1769  add_token_bytestring( & err, dev, opaluid[OPAL_HALF_UID_BOOLEAN_ACE], OPAL_UID_LENGTH / 2)
1771  add_token_u8( & err, dev, 1)
1772  add_token_u8( & err, dev, OPAL_ENDNAME)
1775  add_token_u8( & err, dev, OPAL_ENDLIST)
1776  add_token_u8( & err, dev, OPAL_ENDNAME)
1777  add_token_u8( & err, dev, OPAL_ENDLIST)
1778  add_token_u8( & err, dev, OPAL_ENDNAME)
1780  If err Then
1781  pr_debug("Error building add user to locking range command.\n")
1782  Return err
1785  Return finalize_and_send(dev, Parses and checks for errors )