1SAM_DATA_RESTORE(3)Corosync Cluster Engine Programmer's ManuaSlAM_DATA_RESTORE(3)
2
3
4

NAME

6       sam_data_restore - Restore previously saved user data
7
8

SYNOPSIS

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

DESCRIPTION

17       The sam_data_restore function is used to restore data, previously saved
18       by calling sam_data_store(3). Such data survives between instances.
19
20
21       The data parameter is pointer to memory initialized by  caller.  Stored
22       data  are copied there. This also means, that caller is responsible for
23       freeing memory.
24
25
26       The size parameter is length of data. This one must be  at  least  same
27       length as previously stored data otherwise error is returned. Parameter
28       can be larger but only stored data size bytes are changed.
29
30       Use sam_data_getsize(3) to find out length of stored data.
31
32

RETURN VALUE

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

ERRORS

39       CS_ERR_BAD_HANDLE
40              component was not initialized by calling sam_initialize(3) or it
41              was finalized.
42
43       CS_ERR_INVALID_PARAM
44              data parameter is NULL or size is  less  then  currently  stored
45              data length
46
47

SEE ALSO

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