Improve and add functions comments

Tento commit je obsažen v:
Albert S. 2021-05-22 21:07:35 +02:00
rodič 4b8aa4b7e1
revize 045b7b9b2c

19
qssb.h
Zobrazit soubor

@ -201,6 +201,13 @@ struct qssb_policy *qssb_init_policy()
return result;
}
/* Appends path policies to the qssb_policy object
* The last paramater must be NULL
*
* This function does not copy parameters. All passed paths
* MUST NOT be freed until qssb_enable_policy() is called!
*
* @returns: 0 on success, -1 on failure */
int qssb_append_path_policies(struct qssb_policy *qssb_policy, unsigned int path_policy, ...)
{
va_list args;
@ -741,9 +748,15 @@ static int check_policy_sanity(struct qssb_policy *policy)
/* Enables the specified qssb_policy.
*
* The calling process is supposed *TO BE WRITTEN* if
* this function fails.
* @returns: 0 on sucess, <0 on error
* This function is not atomic (and can't be). This means some
* policies can apply, while others may fail.
*
* This function returns success only if all policies applied.
*
* The state is undefined if this function fails. The process generally
* should exit.
*
* @returns: 0 on success (all policies applied), < 0 on error (none or some policies dit not apply)
*/
int qssb_enable_policy(struct qssb_policy *policy)
{