Skip to content

Commit

Permalink
libteamdctl: add notice for caller to do not modify or free certain s…
Browse files Browse the repository at this point in the history
…trings

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
  • Loading branch information
jpirko committed Mar 5, 2014
1 parent a3cf546 commit 0cc5ad9
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions libteamdctl/libteamdctl.c
Expand Up @@ -474,6 +474,8 @@ int teamdctl_port_config_update_raw(struct teamdctl *tdc,
* Gets raw port config string.
* Does direct method call avoiding possible stale data in the cache.
*
* Note: the obtained string should not be modified or freed by caller.
*
* Returns: zero on success or negative number in case of an error.
**/
TEAMDCTL_EXPORT
Expand Down Expand Up @@ -508,6 +510,8 @@ int teamdctl_port_config_get_raw_direct(struct teamdctl *tdc,
* Using reply cache. Return value is never NULL.
* To refresh the cache, use teamdctl_refresh function.
*
* Note: the obtained string should not be modified or freed by caller.
*
* Returns: pointer to cached config string.
**/
TEAMDCTL_EXPORT
Expand All @@ -524,6 +528,8 @@ char *teamdctl_config_get_raw(struct teamdctl *tdc)
* Gets raw config string.
* Does direct method call avoiding possible stale data in the cache.
*
* Note: the obtained string should not be modified or freed by caller.
*
* Returns: zero on success or negative number in case of an error.
**/
TEAMDCTL_EXPORT
Expand All @@ -540,6 +546,8 @@ int teamdctl_config_get_raw_direct(struct teamdctl *tdc, char **p_cfg)
* Using reply cache. Return value is never NULL.
* To refresh the cache, use teamdctl_refresh function.
*
* Note: the obtained string should not be modified or freed by caller.
*
* Returns: pointer to cached actual config string.
**/
TEAMDCTL_EXPORT
Expand All @@ -556,6 +564,8 @@ char *teamdctl_config_actual_get_raw(struct teamdctl *tdc)
* Gets raw actual config string.
* Does direct method call avoiding possible stale data in the cache.
*
* Note: the obtained string should not be modified or freed by caller.
*
* Returns: zero on success or negative number in case of an error.
**/
TEAMDCTL_EXPORT
Expand All @@ -572,6 +582,8 @@ int teamdctl_config_actual_get_raw_direct(struct teamdctl *tdc, char **p_cfg)
* Using reply cache. Return value is never NULL.
* To refresh the cache, use teamdctl_refresh function.
*
* Note: the obtained string should not be modified or freed by caller.
*
* Returns: pointer to cached state string.
**/
TEAMDCTL_EXPORT
Expand All @@ -588,6 +600,8 @@ char *teamdctl_state_get_raw(struct teamdctl *tdc)
* Gets raw state string.
* Does direct method call avoiding possible stale data in the cache.
*
* Note: the obtained string should not be modified or freed by caller.
*
* Returns: zero on success or negative number in case of an error.
**/
TEAMDCTL_EXPORT
Expand Down

0 comments on commit 0cc5ad9

Please sign in to comment.