Skip to content

Commit

Permalink
rbd: fix build error for rados_service_update_status()
Browse files Browse the repository at this point in the history
/data/tcmu-runner/rbd.c: In function ‘tcmu_rbd_service_status_update’:
/data/tcmu-runner/rbd.c:94:36: error: ‘state’ undeclared (first use in
		this function)
ret = rados_service_update_status(state->cluster, status_buf);
                                      ^

Signed-off-by: Xiubo Li <[email protected]>
  • Loading branch information
Xiubo Li committed Aug 15, 2017
1 parent 73f1507 commit 525c5c6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,10 @@ struct rbd_aio_cb {
static void tcmu_rbd_service_status_update(struct tcmu_device *dev,
bool has_lock)
{
int ret;
struct tcmu_rbd_state *state = tcmu_get_dev_private(dev);
char *status_buf = NULL;
int ret;

ret = asprintf(&status_buf, "%s%c%s%c", "lock_owner", '\0',
has_lock ? "true" : "false", '\0');
if (ret < 0) {
Expand Down

0 comments on commit 525c5c6

Please sign in to comment.