[CRIU] [PATCH 8/9] cpuinfo: Add "cpuinfo [dump|check]" commands

Pavel Emelyanov xemul at parallels.com
Tue Sep 30 03:10:44 PDT 2014


> +int cpu_validate_image_cpuinfo_single(void)

Can we fit the name into less words or at least make it
look like a valid English sentence?

> +{
> +	int ret;
> +
> +	ret = cpu_init();
> +	if (ret)
> +		goto err;
> +
> +	/*
> +	 * Force to check all caps because its been
> +	 * called as a special command from options.
> +	 */
> +	opts.cpu_cap = CPU_CAP_ALL;
> +
> +	ret = cpu_validate_image_cpuinfo();

This guy reports -1 on error. -1 propagated back to the sell
is not the best thing to do :)

> +	if (ret)
> +		goto err;
> +err:
> +	return ret;
> +}



More information about the CRIU mailing list