---
name: "NJB_Get_Disk_Usage"
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_Disk_Usage"
---

# NJB\_Get\_Disk\_Usage(3)

Get total bytes and free bytes from NJB

## NAME

NJB\_Get\_Disk\_Usage - Get total bytes and free bytes from NJB

## LIBRARY

libnjb

## SYNOPSIS

\#include \<sys/types.h\> #include \<libnjb.h\>

extern int njb\_error

int NJB\_Get\_Disk\_Usage(njb\_t **\*njb**, off\_t **\*btotal**, off\_t **\*bfree**)

## DESCRIPTION

This function returns the total available and total free disk space on the NJB, in bytes.  These values are placed into the memory locations pointed to by **\*btotal**and **\*bfree**, respectively.

## RETURN VALUES

NJB\_Get\_Disk\_Usage returns 0 on success. The values pointed to by  **\*btotal**and **\*bfree**have**to**be**64-bit**unsigned**integers.** If an error occurred, -1 is returned and  **njb\_error** is set as follows:

- EO\_BADSTATUS

  The NJB returned a non-zero status

- EO\_USBCTL

  An I/O failure occurred on the USB control pipe.
