klish.c 630 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #include <stdlib.h>
  2. #include <stdint.h>
  3. #include <stdio.h>
  4. #include <string.h>
  5. #include <assert.h>
  6. #include <unistd.h>
  7. #include <errno.h>
  8. #include <sys/types.h>
  9. #include <sys/stat.h>
  10. #include <fcntl.h>
  11. #include <getopt.h>
  12. #include <sys/socket.h>
  13. #include <sys/un.h>
  14. #include <faux/faux.h>
  15. #include <faux/str.h>
  16. #include <klish/ktp.h>
  17. #include <klish/ktp_session.h>
  18. #include "private.h"
  19. int main(int argc, char **argv)
  20. {
  21. int retval = -1;
  22. struct options *opts = NULL;
  23. // Parse command line options
  24. opts = opts_init();
  25. if (opts_parse(argc, argv, opts))
  26. goto err;
  27. retval = 0;
  28. err:
  29. opts_free(opts);
  30. return retval;
  31. }