+ if (errctx)
+ ERROR_LOG("%s\n", errctx);
+ EMERG_LOG("%s\n", lls_strerror(-ret));
+ exit(EXIT_FAILURE);
+ }
+ loglevel = OPT_UINT32_VAL(LOGLEVEL);
+ if (OPT_GIVEN(DETAILED_HELP)) {
+ printf("%s\n", lls_long_help(CMD_PTR));
+ exit(EXIT_SUCCESS);
+ }
+ if (OPT_GIVEN(HELP)) {
+ printf("%s\n", lls_short_help(CMD_PTR));
+ exit(EXIT_SUCCESS);
+ }
+ if (OPT_GIVEN(VERSION)) {
+ printf(
+ "oslfsck " OSL_VERSION "\n"
+ "Copyright (C) 2008-2009 Andre Noll\n"
+ "This is free software with ABSOLUTELY NO WARRANTY."
+ " See COPYING for details.\n"
+ "Written by Andre Noll.\n"
+ "Report bugs to <maan@tuebingen.mpg.de>.\n"
+ );
+ exit(EXIT_SUCCESS);
+ }
+ dd = OPT_STRING_VAL(DATABASE_DIR);
+ if (!dd) {
+ EMERG_LOG("--database-dir: mandatory option not given\n");
+ exit(EXIT_FAILURE);