Daniel P. Berrange wrote:
>> @@ -9673,11 +9675,16 @@ int main(int argc, char **argv)
>>      if (incoming) {
>>          int rc;
>>  
>> -        rc = migrate_incoming(incoming);
>> -        if (rc != 0) {
>> -            fprintf(stderr, "Migration failed rc=%d\n", rc);
>> -            exit(rc);
>> -    }
>> +        if (strncmp(incoming, "monitor", 7) == 0) {
>> +            incoming_monitor = 1;
>> +        }
>> +        else {
>> +            rc = migrate_incoming(incoming);
>> +            if (rc != 0) {
>> +                fprintf(stderr, "Migration failed rc=%d\n", rc);
>> +                exit(rc);
>> +            }
>> +        }
> 
> Rather than putting the strncmp("monitor")  into vl.c, I'd just leave
> this part as is.  Put the logic into the 'migrate_incoming()' method
> so that it just sets the 'incoming_monitor' flag and then returns
> immediately. That would allwo the 'incoming_Monitor' flag to be declared
> static to the migrate.c file, instead of polluting vl.c

Actually, that won't quite work.  We still need to share the incoming_monitor
flag between migration.c and monitor.c.  However, your suggestion is better in
that this is a "migration-specific" flag, so I'll move it over like you suggest.

Chris Lalancette
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to