NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/47752: Add crunchgen support to /usr/sbin/envstat and /usr/sbin/powerd
>Number: 47752
>Category: bin
>Synopsis: Add crunchgen support to /usr/sbin/envstat and /usr/sbin/powerd
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sat Apr 20 23:20:01 +0000 2013
>Originator: Phileas Fogg
>Release: NetBSD-current
>Organization:
>Environment:
macppc
>Description:
Please add crunchgen support to
/usr/sbin/envstat and /usr/sbin/powerd.
A patch is attached.
>How-To-Repeat:
>Fix:
Index: usr.sbin/envstat/prog_ops.h
===================================================================
RCS file: /cvsroot/src/usr.sbin/envstat/prog_ops.h,v
retrieving revision 1.2
diff -u -r1.2 prog_ops.h
--- usr.sbin/envstat/prog_ops.h 15 Dec 2010 15:07:54 -0000 1.2
+++ usr.sbin/envstat/prog_ops.h 20 Apr 2013 22:57:24 -0000
@@ -31,6 +31,7 @@
#include <sys/types.h>
+#ifndef CRUNCHOPS
struct prog_ops {
int (*op_init)(void);
@@ -42,5 +43,10 @@
#define prog_init prog_ops.op_init
#define prog_open prog_ops.op_open
#define prog_close prog_ops.op_close
+#else
+#define prog_init ((int (*)(void))NULL)
+#define prog_open open
+#define prog_close close
+#endif
#endif /* _PROG_OPS_H_ */
Index: usr.sbin/powerd/prog_ops.h
===================================================================
RCS file: /cvsroot/src/usr.sbin/powerd/prog_ops.h,v
retrieving revision 1.1
diff -u -r1.1 prog_ops.h
--- usr.sbin/powerd/prog_ops.h 19 Dec 2010 22:52:08 -0000 1.1
+++ usr.sbin/powerd/prog_ops.h 20 Apr 2013 22:57:25 -0000
@@ -33,6 +33,7 @@
#include <sys/event.h>
#include <sys/time.h>
+#ifndef CRUNCHOPS
struct prog_ops {
int (*op_init)(void);
@@ -55,5 +56,15 @@
#define prog_ioctl prog_ops.op_ioctl
#define prog_fcntl prog_ops.op_fcntl
#define prog_kqueue prog_ops.op_kqueue
+#else
+#define prog_init ((int (*)(void))NULL)
+#define prog_open open
+#define prog_close close
+#define prog_read read
+#define prog_kevent kevent
+#define prog_ioctl ioctl
+#define prog_fcntl fcntl
+#define prog_kqueue kqueue
+#endif
#endif /* _PROG_OPS_H_ */
Home |
Main Index |
Thread Index |
Old Index