[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [lvm-devel] [PATCH] Workaround for kernel 3.0 & uname



On Sat, Jun 04, 2011 at 09:03:35PM +0200, Milan Broz wrote:
> +		_kernel_release = 0;

Let's move those (noops) out of the way to the initialisation,
  static int _kernel_major = 0;

Then the if test can be simplified:
	/* Kernels with a major number of 2 always had 3 parts. */
	if (parts < 1 || (_kernel_major < 3 && parts < 3))

>  		log_error("Could not determine kernel version used.");
>  		return 0;
>  	}

Alasdair


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]