man NJB_Get_Disk_Usage (Fonctions bibliothèques) - 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 *btotaland *bfree, respectively.
RETURN VALUES
NJB_Get_Disk_Usage returns 0 on success. The values pointed to by *btotaland *bfreehavetobe64-bitunsignedintegers. 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.