Exemple #1
0
void set_vcpu_migration_delay_func(int argc, char *argv[])
{
    int value;

    if ( argc != 1 || (value = atoi(argv[0])) < 0 ) {
        fprintf(stderr, "Missing or invalid argument(s)\n");
        exit(EINVAL);
    }

    if ( !xc_set_vcpu_migration_delay(xc_handle, value) )
        printf("set vcpu migration delay to %d us succeeded\n", value);
    else
        fprintf(stderr, "set vcpu migration delay failed (%d - %s)\n",
                errno, strerror(errno));
}
Exemple #2
0
void set_vcpu_migration_delay_func(int argc, char *argv[])
{
    int value;
    int rc;

    if (argc != 1){
        show_help();
        exit(-1);
    }

    value = atoi(argv[0]);

    if (value < 0)
    {
        printf("Please try non-negative vcpu migration delay\n");
        exit(-1);
    }

    rc = xc_set_vcpu_migration_delay(xc_handle, value);
    printf("%s to set vcpu migration delay to %d us\n",
                    rc? "Fail":"Succeed", value );

    return;
}