---
name: "NJB_Get_Owner_String"
section: "3"
platform: "linux"
package: "libnjb1-doc"
version: "1.1-2"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/NJB_Get_Owner_String"
---

# NJB\_Get\_Owner\_String(3)

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)](/free/3.md) 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.

## SEE ALSO

[free(3)](/free/3.md)
