man NJB_Set_Owner_String (Fonctions bibliothèques) - Get and set the owner name on the NJB
NAME
NJB_Get_Owner_String, NJB_Set_Owner_String - Get and set the owner name on the NJB
LIBRARY
libnjb
SYNOPSIS
#include <libnjb.h>
extern int njb_error
char *NJB_Get_Owner_String (njb_t *njb)
int NJB_Set_Owner_String (njb_t *njb, char *name)
DESCRIPTION
These commands are used to get and set the owner name on the NJB. NJB_Get_Owner_String returns a pointer to a character string containing the owner name. It is the calling program's responsibility to free up this memory using free(3) when it is no longer needed.
There owner name cannot exceed 64 bytes. If the *name pointer sent to NJB_Set_Owner_String references a string longer than 64 bytes, then it is truncated before being sent to the NJB.
RETURN VALUES
Both NJB_Get_Owner_String and NJB_Set_Owner_String return 0 on success, and -1 on failure. Both functions set njb_error:
- EO_BADSTATUS
- The NJB returned a non-zero status
- EO_USBBLK
- An I/O error occurred when communicating on the bulk data pipe.
- EO_USBCTL
- An I/O error occurred when communicating on the control pipe.
NJB_Get_Owner_String may additionaly set the following:
- EO_NOMEM
- Not enough memory was available to hold the owner string. EO_RDSHORT The NJB returned fewer bytes than expected on the bulk data pipe.
NJB_Set_Owner_String may return:
- EO_WRSHORT
- Fewer bytes than expected were written to the bulk data pipe.