xtrabackup.c exit codes

7 views
Skip to first unread message

Baron Schwartz

unread,
Nov 8, 2010, 8:39:40 AM11/8/10
to perco...@googlegroups.com
Why does the following code, and several other places in main(), exit
with -1 instead of 1? I can't figure out the meaning of -1 versus 1.

5241 if (strcmp(mysql_data_home, "./") == 0) {
5242 if (!xtrabackup_print_param)
5243 usage();
5244 printf("\nxtrabackup: Error: Please set parameter 'datadir'\n");
5245 exit(-1);
5246 }

And on another note is it even possible to reach the above code? I
think that because there is a compiled-in default value for --datadir,
even if I don't specify it and I don't have a my.cnf file on my machine,
xtrabackup will still print a params file without an error.

Reply all
Reply to author
Forward
0 new messages