aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoseph Koshy <jkoshy@FreeBSD.org>2008-03-12 15:51:32 +0000
committerJoseph Koshy <jkoshy@FreeBSD.org>2008-03-12 15:51:32 +0000
commit484202faab4474c1fbe2acbdd66843fbaec9e885 (patch)
tree86730e3ffd63696a578ca8268166baf84d1080a0 /lib
parentef4ba9be479b9fe03d41003e2a1b8e8f77375e6f (diff)
downloadsrc-484202faab4474c1fbe2acbdd66843fbaec9e885.tar.gz
src-484202faab4474c1fbe2acbdd66843fbaec9e885.zip
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.
Notes
Notes: svn path=/head/; revision=177107
Diffstat (limited to 'lib')
-rw-r--r--lib/libpmc/libpmc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/libpmc/libpmc.c b/lib/libpmc/libpmc.c
index e1ad3ca9985d..0075f9d2736c 100644
--- a/lib/libpmc/libpmc.c
+++ b/lib/libpmc/libpmc.c
@@ -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