#include "common.h"
int main (int argc, char **argv)
{
int n, opt, debug;
extern char *optarg;
u_int64_t total;
u_int64_t free;
debug = 0;
while ( (opt = getopt(argc, argv, "D:")) != -1 ) {
switch (opt) {
case 'D':
debug = atoi(optarg);
break;
default:
fprintf(stderr, "usage: handshake [ -D debuglvl ]\n");
return 1;
}
}
fprintf(stderr, "could not locate any jukeboxes\n");
return 1;
}
if ( n == 0 ) {
fprintf(stderr, "no NJB devices found\n");
return 0;
}
njb = &njbs[0];
return 1;
}
return 1;
}
#ifdef __WIN32__
printf("Total bytes on jukebox: %I64u (%I64u MB)\n",
total, total/(1024*1024));
printf("Free bytes on jukebox: %I64u (%I64u MB)\n",
free, free/(1024*1024));
#else
printf("Total bytes on jukebox: %llu (%llu MB)\n",
total, total/(1024*1024));
printf("Free bytes on jukebox: %llu (%llu MB)\n",
free, free/(1024*1024));
#endif
return 0;
}
void NJB_Close(njb_t *njb)
Definition: procedure.c:184
int NJB_Discover(njb_t *njbs, int limit, int *n)
Definition: procedure.c:108
int NJB_Open(njb_t *njb)
Definition: procedure.c:130
int NJB_Get_Disk_Usage(njb_t *njb, u_int64_t *btotal, u_int64_t *bfree)
Definition: procedure.c:657
void NJB_Set_Debug(int debug_flags)
Definition: procedure.c:2819
void NJB_Error_Dump(njb_t *njb, FILE *fp)
Definition: njb_error.c:418
#define NJB_MAX_DEVICES
Definition: libnjb.h:60