1SAM_DATA_STORE(3) Corosync Cluster Engine Programmer's ManualSAM_DATA_STORE(3)
2
3
4

NAME

6       sam_data_store - Store user data
7
8

SYNOPSIS

10       #include <corosync/sam.h>
11
12
13       cs_error_t sam_data_store (const void *data, size_t size);
14
15

DESCRIPTION

17       The  sam_data_store  function  is  used  to  store data, which survives
18       between instances.
19
20
21       The data parameter is pointer to memory with data to  store.  Data  are
22       stored  in  newly allocated memory inside library, so caller can safely
23       remove them after call of function.
24
25       You can use NULL as parameter to remove and free previously saved data.
26       In this case size argument is ignored.
27
28
29       The size parameter is length of data.
30
31       Use   sam_data_getsize(3)  to  find  out  length  of  stored  data  and
32       sam_data_restore(3) to restore stored data.
33
34

RETURN VALUE

36       This call return CS_OK value if  successful,  otherwise  and  error  is
37       returned.
38
39

ERRORS

41       CS_ERR_BAD_HANDLE
42              component was not initialized by calling sam_initialize(3) or it
43              was finalized.
44
45       CS_ERR_NO_MEMORY
46              internal malloc/realloc failed because data are too large
47
48       CS_ERR_LIBRARY
49              some internal error appeared (mostly because communication  with
50              parent process failed)
51
52

SEE ALSO

54       sam_data_getsize(3), sam_data_restore(3)
55
56       CS_ERR_TRY_AGAIN Resource temporarily unavailable
57
58       CS_ERR_INVALID_PARAM Invalid argument
59
60       CS_ERR_ACCESS Permission denied
61
62       CS_ERR_LIBRARY The connection failed
63
64       CS_ERR_INTERRUPT System call interrupted by a signal
65
66       CS_ERR_NOT_SUPPORTED The requested protocol/functionality not supported
67
68       CS_ERR_MESSAGE_ERROR Incorrect auth message received
69
70       CS_ERR_NO_MEMORY Not enough memory to complete the requested task
71
72
73
74corosync Man Page                 04/15/2010                 SAM_DATA_STORE(3)
Impressum