Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Fix POWER_IOC_GET_TYPE.
details: https://anonhg.NetBSD.org/src/rev/c5d54a48a673
branches: trunk
changeset: 748835:c5d54a48a673
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Fri Nov 06 18:28:10 2009 +0000
description:
Fix POWER_IOC_GET_TYPE.
The longest string in use with this seems to have been "acpi",
so size_t covered that, but on 32-bit ports omited the NUL.
diffstat:
sys/dev/sysmon/sysmon_power.c | 5 +++--
sys/sys/power.h | 5 +++--
2 files changed, 6 insertions(+), 4 deletions(-)
diffs (44 lines):
diff -r a3fd07dc8a7e -r c5d54a48a673 sys/dev/sysmon/sysmon_power.c
--- a/sys/dev/sysmon/sysmon_power.c Fri Nov 06 18:26:06 2009 +0000
+++ b/sys/dev/sysmon/sysmon_power.c Fri Nov 06 18:28:10 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sysmon_power.c,v 1.41 2009/06/08 00:55:35 pgoyette Exp $ */
+/* $NetBSD: sysmon_power.c,v 1.42 2009/11/06 18:28:10 jakllsch Exp $ */
/*-
* Copyright (c) 2007 Juan Romero Pardines.
@@ -69,7 +69,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sysmon_power.c,v 1.41 2009/06/08 00:55:35 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysmon_power.c,v 1.42 2009/11/06 18:28:10 jakllsch Exp $");
#include "opt_compat_netbsd.h"
#include <sys/param.h>
@@ -546,6 +546,7 @@
switch (cmd) {
case POWER_IOC_GET_TYPE:
+ case POWER_IOC_GET_TYPE_WITH_LOSSAGE:
{
struct power_type *power_type = (void *) data;
diff -r a3fd07dc8a7e -r c5d54a48a673 sys/sys/power.h
--- a/sys/sys/power.h Fri Nov 06 18:26:06 2009 +0000
+++ b/sys/sys/power.h Fri Nov 06 18:28:10 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: power.h,v 1.13 2009/06/08 00:55:35 pgoyette Exp $ */
+/* $NetBSD: power.h,v 1.14 2009/11/06 18:28:10 jakllsch Exp $ */
/*
* Copyright (c) 2003 Wasabi Systems, Inc.
@@ -245,6 +245,7 @@
struct power_type {
char power_type[32];
};
-#define POWER_IOC_GET_TYPE _IOR('P', 0, sizeof(struct power_type))
+#define POWER_IOC_GET_TYPE _IOR('P', 0, struct power_type)
+#define POWER_IOC_GET_TYPE_WITH_LOSSAGE _IOR('P', 0, sizeof(struct power_type))
#endif /* _SYS_POWER_H_ */
Home |
Main Index |
Thread Index |
Old Index