Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/share/man/man4 fix the example code to be closer to compilat...
details: https://anonhg.NetBSD.org/src/rev/203460feaa9d
branches: trunk
changeset: 751945:203460feaa9d
user: cnst <cnst%NetBSD.org@localhost>
date: Tue Feb 09 07:32:09 2010 +0000
description:
fix the example code to be closer to compilation and update for aibs(4)
diffstat:
share/man/man4/envsys.4 | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diffs (59 lines):
diff -r 271f2b94b927 -r 203460feaa9d share/man/man4/envsys.4
--- a/share/man/man4/envsys.4 Tue Feb 09 06:49:41 2010 +0000
+++ b/share/man/man4/envsys.4 Tue Feb 09 07:32:09 2010 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: envsys.4,v 1.45 2009/12/19 00:15:28 snj Exp $
+.\" $NetBSD: envsys.4,v 1.46 2010/02/09 07:32:09 cnst Exp $
.\"
.\" Copyright (c) 2007 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -353,7 +353,7 @@
of
.Ql sensor0
in the
-.Ql aiboost0
+.Ql aibs0
device with the
.Dv ENVSYS_SETDICTIONARY
.Xr ioctl 2 :
@@ -364,26 +364,26 @@
prop_dictionary_t global_dict, sensor_dict;
prop_array_t array;
prop_object_t obj;
- int fd;
+ int fd, error;
global_dict = prop_dictionary_create();
sensor_dict = prop_dictionary_create();
array = prop_array_create();
- if (!prop_dictionary_set(global_dict, "aiboost0", array))
+ if (!prop_dictionary_set(global_dict, "aibs0", array))
err(EINVAL, "prop_dictionary_set global");
obj = prop_string_create_cstring_nocopy("sensor0");
if (obj == NULL ||
- !prop_dictionary_set(dict, "index", obj))
+ !prop_dictionary_set(sensor_dict, "index", obj))
err(EINVAL, "sensor index");
prop_object_release(obj);
/* new description */
- obj = prop_string_create_cstring_nocopy("CPU temp");
+ obj = prop_string_create_cstring_nocopy("CPU core voltage");
if (obj == NULL ||
- !prop_dictionary_set(dict, "description", obj))
+ !prop_dictionary_set(sensor_dict, "description", obj))
err(EINVAL, "new description");
prop_object_release(obj);
@@ -392,7 +392,7 @@
err(EINVAL, "prop_array_add");
if ((fd = open(_DEV_SYSMON, O_RDWR)) == \-1)
- err(EXIT_FAILURE, "open")
+ err(EXIT_FAILURE, "open");
/* we are done, send the dictionary */
error = prop_dictionary_send_ioctl(global_dict,
Home |
Main Index |
Thread Index |
Old Index