Re: [PATCH 02/13] block monitor: freeze spare assignment for external arrays

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

 



I've applied 1/13 to devel-3.2
and if have applied this (2/13) with a few changes:

> +		version = ping_monitor_version(container);
> +		ver = version ? mdadm_version(version) : -1;
> +		free(version);
> +		if (ver < 3001003) {

I changed this to 3002000 and changed ReadMe.c so the version is 3.2-devel.

>  
> +int mdadm_version(char *version)
> +{
> +	int a, b, c;
> +	char *cp;
> +
> +	if (!version)
> +		version = Version;
> +
> +	cp = strchr(version, '-');
> +	if (!cp || *(cp+1) != ' ' || *(cp+2) != 'v')
> +		return -1;
> +	cp += 3;
> +	a = strtoul(cp, &cp, 10);
> +	if (*cp != '.')
> +		return -1;
> +	b = strtoul(cp+1, &cp, 10);
> +	if (*cp != '.')
> +		return -1;
> +	c = strtoul(cp+1, &cp, 10);
> +	if (*cp != ' ')
> +		return -1;
> +	return (a*1000000)+(b*1000)+c;
> +}
> +

I have fixed this so that it access 2 number versions, and ignores a trailing
  "-tag", so 3.2-devel is parsed OK.

NeilBrown

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux