1SAM_DATA_GETSIZE(3)Corosync Cluster Engine Programmer's ManuaSlAM_DATA_GETSIZE(3)
2
3
4
6 sam_data_getsize - Return size of stored data in bytes
7
8
10 #include <corosync/sam.h>
11
12
13 cs_error_t sam_data_getsize (size_t *size);
14
15
17 The sam_data_getsize function is used to return size of stored data.
18 Size is returned in bytes. If user data is NULL, zero is returned.
19 Function is intended to be used before sam_data_restore(3) call to
20 properly allocate buffer for restored data.
21
22
24 This call return CS_OK value if successful, otherwise and error is
25 returned.
26
27
29 CS_ERR_BAD_HANDLE
30 component was not initialized by calling sam_initialize(3) or it
31 was finalized.
32
33 CS_ERR_INVALID_PARAM
34 size parameter is NULL
35
36
38 sam_data_store(3), sam_data_restore(3)
39
40 CS_ERR_TRY_AGAIN Resource temporarily unavailable
41
42 CS_ERR_INVALID_PARAM Invalid argument
43
44 CS_ERR_ACCESS Permission denied
45
46 CS_ERR_LIBRARY The connection failed
47
48 CS_ERR_INTERRUPT System call interrupted by a signal
49
50 CS_ERR_NOT_SUPPORTED The requested protocol/functionality not supported
51
52 CS_ERR_MESSAGE_ERROR Incorrect auth message received
53
54 CS_ERR_NO_MEMORY Not enough memory to complete the requested task
55
56
57
58corosync Man Page 04/15/2010 SAM_DATA_GETSIZE(3)