|
@@ -236,7 +236,7 @@ int main(int argc, char* argv[], char* env[])
|
|
long cols = 0;
|
|
long cols = 0;
|
|
GData **aliases = NULL;
|
|
GData **aliases = NULL;
|
|
GData **commands = NULL;
|
|
GData **commands = NULL;
|
|
- GArray *hosts = NULL;
|
|
|
|
|
|
+ GArray *hosts = NULL, *tmp_hosts = NULL;
|
|
|
|
|
|
static struct option long_options[] =
|
|
static struct option long_options[] =
|
|
{
|
|
{
|
|
@@ -274,12 +274,17 @@ int main(int argc, char* argv[], char* env[])
|
|
switch(c)
|
|
switch(c)
|
|
{
|
|
{
|
|
case 'a':
|
|
case 'a':
|
|
- if(aliases && (hosts = g_datalist_get_data(aliases,
|
|
|
|
|
|
+ if(aliases && (tmp_hosts = g_datalist_get_data(aliases,
|
|
optarg)) == NULL)
|
|
optarg)) == NULL)
|
|
{
|
|
{
|
|
fprintf(stderr, "Alias '%s' not found\n\n", optarg);
|
|
fprintf(stderr, "Alias '%s' not found\n\n", optarg);
|
|
usage(argv[0]);
|
|
usage(argv[0]);
|
|
}
|
|
}
|
|
|
|
+ if (hosts == NULL) {
|
|
|
|
+ hosts = tmp_hosts;
|
|
|
|
+ } else {
|
|
|
|
+ g_array_append_vals (hosts, tmp_hosts->data, tmp_hosts->len);
|
|
|
|
+ }
|
|
break;
|
|
break;
|
|
case 'c':
|
|
case 'c':
|
|
errno = 0;
|
|
errno = 0;
|