staticvoid usage() __attribute__ ((noreturn)); staticvoid usage()
{
print_version();
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n");
puts("Displays the options from option groups of option files, which is useful to see which options a particular tool will use");
printf("Usage: %s [OPTIONS] [groups]\n", my_progname);
my_print_help(my_long_options);
my_print_default_files(config_file);
my_print_variables(my_long_options);
printf("\nExample usage:\n%s --defaults-file=example.cnf client client-server mysql\n", my_progname);
cleanup_and_exit(0);
}
/* Check out the args */ if (get_options(&argc,&org_argv))
cleanup_and_exit(1);
nargs= argc + 1; if (opt_mysqld)
nargs+= array_elements(mysqld_groups);
if (nargs < 2)
usage();
load_default_groups=(char**) my_malloc(PSI_NOT_INSTRUMENTED,
nargs*sizeof(char*), MYF(MY_WME)); if (!load_default_groups)
cleanup_and_exit(1);
if (opt_mysqld)
{ for (; mysqld_groups[i]; i++)
load_default_groups[i]= (char*) mysqld_groups[i];
}
memcpy(load_default_groups + i, org_argv, (argc + 1) * sizeof(*org_argv)); if ((error= load_defaults(config_file, (constchar **) load_default_groups,
&count, &arguments)))
{
my_free(load_default_groups);
my_end(0); if (error == 4) return0; if (verbose && opt_defaults_file_used)
{ if (error == 1)
fprintf(stderr, "WARNING: Defaults file '%s' not found!\n",
config_file); /* This error is not available now. For the future */ if (error == 2)
fprintf(stderr, "WARNING: Defaults file '%s' is not a regular file!\n",
config_file);
} return2;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.