summaryrefslogtreecommitdiff
path: root/netware
diff options
context:
space:
mode:
authorunknown <greg@mysql.com>2003-03-21 16:14:52 -0500
committerunknown <greg@mysql.com>2003-03-21 16:14:52 -0500
commit0f18ab78970cd64418646e83a32d7e487477fb86 (patch)
tree24b4f6a5c5a8bf2fbe95e6fd4b33779ed0e10dcb /netware
parent0ea383e048f6cb07a01e06d63f30baef0c2af3ff (diff)
downloadmariadb-git-0f18ab78970cd64418646e83a32d7e487477fb86.tar.gz
Missed one file from Novell changes in 1.1686
netware/mysqld_safe.c: Changes to argument handling, spawn, etc
Diffstat (limited to 'netware')
-rw-r--r--netware/mysqld_safe.c98
1 files changed, 49 insertions, 49 deletions
diff --git a/netware/mysqld_safe.c b/netware/mysqld_safe.c
index 1ab90775e02..845797e0022 100644
--- a/netware/mysqld_safe.c
+++ b/netware/mysqld_safe.c
@@ -60,7 +60,7 @@ void vlog(char *, va_list);
void log(char *, ...);
void start_defaults(int, char*[]);
void finish_defaults();
-void read_defaults(arg_list);
+void read_defaults(arg_list_t *);
void parse_args(int, char*[]);
void get_options(int, char*[]);
void check_data_vol();
@@ -249,9 +249,9 @@ void finish_defaults()
Read the defaults.
******************************************************************************/
-void read_defaults(arg_list pal)
+void read_defaults(arg_list_t *pal)
{
- arg_list al;
+ arg_list_t al;
char defaults_file[PATH_MAX];
char mydefaults[PATH_MAX];
char line[PATH_MAX];
@@ -265,17 +265,17 @@ void read_defaults(arg_list pal)
snprintf(mydefaults, PATH_MAX, "%s/bin/my_print_defaults", basedir);
// args
- init_args(al);
- add_arg(al, mydefaults);
- if (default_option[0]) add_arg(al, default_option);
- add_arg(al, "mysqld");
- add_arg(al, "server");
- add_arg(al, "mysqld_safe");
- add_arg(al, "safe_mysqld");
+ init_args(&al);
+ add_arg(&al, mydefaults);
+ if (default_option[0]) add_arg(&al, default_option);
+ add_arg(&al, "mysqld");
+ add_arg(&al, "server");
+ add_arg(&al, "mysqld_safe");
+ add_arg(&al, "safe_mysqld");
- spawn(mydefaults, al, TRUE, NULL, defaults_file, NULL);
+ spawn(mydefaults, &al, TRUE, NULL, defaults_file, NULL);
- free_args(al);
+ free_args(&al);
// gather defaults
if((fp = fopen(defaults_file, "r")) != NULL)
@@ -405,17 +405,17 @@ void parse_args(int argc, char *argv[])
******************************************************************************/
void get_options(int argc, char *argv[])
{
- arg_list al;
+ arg_list_t al;
// start defaults
start_defaults(argc, argv);
// default file arguments
- init_args(al);
- add_arg(al, "ignore");
- read_defaults(al);
- parse_args(al->argc, al->argv);
- free_args(al);
+ init_args(&al);
+ add_arg(&al, "ignore");
+ read_defaults(&al);
+ parse_args(al.argc, al.argv);
+ free_args(&al);
// command-line arguments
parse_args(argc, argv);
@@ -504,7 +504,7 @@ void check_setup()
******************************************************************************/
void check_tables()
{
- arg_list al;
+ arg_list_t al;
char mycheck[PATH_MAX];
char table[PATH_MAX];
char db[PATH_MAX];
@@ -549,21 +549,21 @@ void check_tables()
snprintf(mycheck, PATH_MAX, "%s/bin/myisamchk", basedir);
// args
- init_args(al);
- add_arg(al, mycheck);
- add_arg(al, "--silent");
- add_arg(al, "--force");
- add_arg(al, "--fast");
- add_arg(al, "--medium-check");
- add_arg(al, "-O");
- add_arg(al, "key_buffer=64M");
- add_arg(al, "-O");
- add_arg(al, "sort_buffer=64M");
- add_arg(al, table);
-
- spawn(mycheck, al, TRUE, NULL, NULL, NULL);
-
- free_args(al);
+ init_args(&al);
+ add_arg(&al, mycheck);
+ add_arg(&al, "--silent");
+ add_arg(&al, "--force");
+ add_arg(&al, "--fast");
+ add_arg(&al, "--medium-check");
+ add_arg(&al, "-O");
+ add_arg(&al, "key_buffer=64M");
+ add_arg(&al, "-O");
+ add_arg(&al, "sort_buffer=64M");
+ add_arg(&al, table);
+
+ spawn(mycheck, &al, TRUE, NULL, NULL, NULL);
+
+ free_args(&al);
}
else if (strindex(table, ".ism"))
{
@@ -573,17 +573,17 @@ void check_tables()
snprintf(mycheck, PATH_MAX, "%s/bin/isamchk", basedir);
// args
- init_args(al);
- add_arg(al, mycheck);
- add_arg(al, "--silent");
- add_arg(al, "--force");
- add_arg(al, "-O");
- add_arg(al, "sort_buffer=64M");
- add_arg(al, table);
+ init_args(&al);
+ add_arg(&al, mycheck);
+ add_arg(&al, "--silent");
+ add_arg(&al, "--force");
+ add_arg(&al, "-O");
+ add_arg(&al, "sort_buffer=64M");
+ add_arg(&al, table);
- spawn(mycheck, al, TRUE, NULL, NULL, NULL);
+ spawn(mycheck, &al, TRUE, NULL, NULL, NULL);
- free_args(al);
+ free_args(&al);
}
}
}
@@ -599,7 +599,7 @@ void check_tables()
******************************************************************************/
void mysql_start(int argc, char *argv[])
{
- arg_list al;
+ arg_list_t al;
int i, j, err;
struct stat info;
time_t cal;
@@ -619,8 +619,8 @@ void mysql_start(int argc, char *argv[])
};
// args
- init_args(al);
- add_arg(al, "%s", mysqld);
+ init_args(&al);
+ add_arg(&al, "%s", mysqld);
// parent args
for(i = 1; i < argc; i++)
@@ -637,7 +637,7 @@ void mysql_start(int argc, char *argv[])
}
}
- if (!skip) add_arg(al, "%s", argv[i]);
+ if (!skip) add_arg(&al, "%s", argv[i]);
}
// spawn
@@ -653,7 +653,7 @@ void mysql_start(int argc, char *argv[])
log("mysql started : %s\n", stamp);
// spawn mysqld
- spawn(mysqld, al, TRUE, NULL, NULL, err_log);
+ spawn(mysqld, &al, TRUE, NULL, NULL, err_log);
}
while (!stat(pid_file, &info));
@@ -664,7 +664,7 @@ void mysql_start(int argc, char *argv[])
log("mysql stopped : %s\n\n", stamp);
// free args
- free_args(al);
+ free_args(&al);
}
/******************************************************************************