1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-31 16:57:10 +00:00

Bring the behaviour of pmc_capabilities() and pmc_width() in line with

documentation: set 'errno' and return -1 in case of an error.

Update (c) years.
This commit is contained in:
Joseph Koshy 2008-03-12 15:51:32 +00:00
parent ef4ba9be47
commit 484202faab
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=177107

View File

@ -1,5 +1,5 @@
/*-
* Copyright (c) 2003-2006 Joseph Koshy
* Copyright (c) 2003-2008 Joseph Koshy
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -1731,7 +1731,8 @@ pmc_capabilities(pmc_id_t pmcid, uint32_t *caps)
*caps = cpu_info.pm_classes[i].pm_caps;
return (0);
}
return (EINVAL);
errno = EINVAL;
return (-1);
}
int
@ -2194,7 +2195,8 @@ pmc_width(pmc_id_t pmcid, uint32_t *width)
*width = cpu_info.pm_classes[i].pm_width;
return (0);
}
return (EINVAL);
errno = EINVAL;
return (-1);
}
int