1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <errno.h> #include <libsmbclient.h> int main(int argc, char **argv ) { int err = -1; if ( argc > 1 ) { err = smbc_init(NULL, atoi(argv[1])); if ( err < 0 ) err = 1; } return err; }