Skip to content

Commit f01d5cb

Browse files
committed
libceph: rename ceph_entity_name_encode() -> ceph_auth_entity_name_encode()
Clear up EntityName vs entity_name_t confusion. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> Reviewed-by: Mike Christie <mchristi@redhat.com> Reviewed-by: Alex Elder <elder@linaro.org>
1 parent 694d0d0 commit f01d5cb

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

include/linux/ceph/auth.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ extern int ceph_auth_build_hello(struct ceph_auth_client *ac,
104104
extern int ceph_handle_auth_reply(struct ceph_auth_client *ac,
105105
void *buf, size_t len,
106106
void *reply_buf, size_t reply_len);
107-
extern int ceph_entity_name_encode(const char *name, void **p, void *end);
107+
int ceph_auth_entity_name_encode(const char *name, void **p, void *end);
108108

109109
extern int ceph_build_auth(struct ceph_auth_client *ac,
110110
void *msg_buf, size_t msg_len);

net/ceph/auth.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,10 @@ void ceph_auth_reset(struct ceph_auth_client *ac)
8282
mutex_unlock(&ac->mutex);
8383
}
8484

85-
int ceph_entity_name_encode(const char *name, void **p, void *end)
85+
/*
86+
* EntityName, not to be confused with entity_name_t
87+
*/
88+
int ceph_auth_entity_name_encode(const char *name, void **p, void *end)
8689
{
8790
int len = strlen(name);
8891

@@ -124,7 +127,7 @@ int ceph_auth_build_hello(struct ceph_auth_client *ac, void *buf, size_t len)
124127
for (i = 0; i < num; i++)
125128
ceph_encode_32(&p, supported_protocols[i]);
126129

127-
ret = ceph_entity_name_encode(ac->name, &p, end);
130+
ret = ceph_auth_entity_name_encode(ac->name, &p, end);
128131
if (ret < 0)
129132
goto out;
130133
ceph_decode_need(&p, end, sizeof(u64), bad);

net/ceph/auth_none.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ static int ceph_auth_none_build_authorizer(struct ceph_auth_client *ac,
4646
int ret;
4747

4848
ceph_encode_8_safe(&p, end, 1, e_range);
49-
ret = ceph_entity_name_encode(ac->name, &p, end);
49+
ret = ceph_auth_entity_name_encode(ac->name, &p, end);
5050
if (ret < 0)
5151
return ret;
5252

0 commit comments

Comments
 (0)