Page MenuHomeFreeBSD

D55508.id177612.diff
No OneTemporary

D55508.id177612.diff

diff --git a/sys/kern/subr_power.c b/sys/kern/subr_power.c
--- a/sys/kern/subr_power.c
+++ b/sys/kern/subr_power.c
@@ -3,7 +3,7 @@
*
* Copyright (c) 2001 Mitsuru IWASAKI
* All rights reserved.
- * Copyright (c) 2025 The FreeBSD Foundation
+ * Copyright (c) 2025-2026 The FreeBSD Foundation
*
* Portions of this software were developed by Aymeric Wibo
* <obiwac@freebsd.org> under sponsorship from the FreeBSD Foundation.
@@ -31,7 +31,10 @@
*/
#include <sys/param.h>
+#include <sys/conf.h>
#include <sys/eventhandler.h>
+#include <sys/fcntl.h>
+#include <sys/kernel.h>
#include <sys/power.h>
#include <sys/proc.h>
#include <sys/sbuf.h>
@@ -49,8 +52,6 @@
static bool power_pm_supported[POWER_STYPE_COUNT] = {0};
static struct task power_pm_task;
-<<<<<<< HEAD
-=======
static d_ioctl_t power_ioctl;
static struct cdevsw power_cdevsw = {
@@ -97,7 +98,6 @@
return (0);
}
->>>>>>> 3f220005316b (power: Rename power transition enum)
enum power_stype
power_name_to_stype(const char *name)
{
diff --git a/sys/sys/power.h b/sys/sys/power.h
--- a/sys/sys/power.h
+++ b/sys/sys/power.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2001 Mitsuru IWASAKI
* All rights reserved.
- * Copyright (c) 2025 The FreeBSD Foundation
+ * Copyright (c) 2025-2026 The FreeBSD Foundation
*
* Portions of this software were developed by Aymeric Wibo
* <obiwac@freebsd.org> under sponsorship from the FreeBSD Foundation.
@@ -32,17 +32,9 @@
#ifndef _SYS_POWER_H_
#define _SYS_POWER_H_
-#ifdef _KERNEL
-#include <sys/_eventhandler.h>
#include <sys/types.h>
-
-/* Power management system type */
-#define POWER_PM_TYPE_ACPI 0x01
-#define POWER_PM_TYPE_NONE 0xff
-
-/* Commands for Power management function */
-#define POWER_CMD_SUSPEND 0x00
+#include <sys/ioccom.h>
/*
* Sleep state transition requests.
@@ -55,8 +47,25 @@
POWER_TRANSITION_STANDBY,
POWER_TRANSITION_SUSPEND,
POWER_TRANSITION_HIBERNATE,
+ POWER_TRANSITION_COUNT,
};
+/*
+ * Power ioctls.
+ */
+#define PIOTRANSITION _IOW('P', 1, uint32_t)
+
+#ifdef _KERNEL
+
+#include <sys/_eventhandler.h>
+
+/* Power management system type */
+#define POWER_PM_TYPE_ACPI 0x01
+#define POWER_PM_TYPE_NONE 0xff
+
+/* Commands for Power management function */
+#define POWER_CMD_SUSPEND 0x00
+
/*
* Sleep type.
*

File Metadata

Mime Type
text/plain
Expires
Thu, Aug 13, 5:20 PM (5 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36669976
Default Alt Text
D55508.id177612.diff (2 KB)

Event Timeline