vol: Correct VolumeNumber for large volume IDs

VolumeNumber was using atoi to convert a volume header name to a
volume ID. This can return just -1 for volume IDs larger than 2^31-1,
though, so use strtoul instead.

Reviewed-on: http://gerrit.openafs.org/4199
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 0f1c921fa1)

Change-Id: Ib56d3f77f0d90f5ad55b3c0de89632d271436f7e
Reviewed-on: http://gerrit.openafs.org/4284
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
Andrew Deason 2011-03-10 18:37:44 -06:00 committed by Derrick Brashear
parent 4d691ae109
commit 911b258304

View File

@ -6058,7 +6058,7 @@ VolumeNumber(char *name)
{
if (*name == OS_DIRSEPC)
name++;
return atoi(name + 1);
return strtoul(name + 1, NULL, 10);
}
/**