 +	if (this_node.cn_nodeid == 0) {
 +		cman_get_node(c_handle, 0, &this_node);
  	}
-+	memcpy(csid, &this_node.cn_nodeid, MAX_CSID_LEN);
++	memcpy(csid, &this_node.cn_nodeid, CMAN_MAX_CSID_LEN);
  }
  
 -/* Call a callback routine for each node that known (down mean not running a clvmd) */

 			return 0;
 		}
 	}
@@ -431,7 +371,7 @@ static int nodeid_from_csid(char *csid)
 
 static int _is_quorate()
 {
-	return ioctl(cluster_sock, SIOCCLUSTER_ISQUORATE, 0);
+	return cman_is_quorate(c_handle);
 }
 
 static void sync_ast_routine(void *arg)

 
 struct lock_wait {
 	pthread_cond_t cond;
@@ -68,30 +73,23 @@ struct lock_wait {
 
 static int _init_cluster(void)
 {
