power-profiles-daemon/src/ppd-utils.h
Mario Limonciello 9a740c02d6 Add a ppd_utils_write_sysfs_int() helper
Suggested-by: Marco Trevisan (Treviño) <mail@3v1n0.net>
2024-02-13 23:20:42 +00:00

32 lines
1.3 KiB
C

/*
* Copyright (c) 2020 Bastien Nocera <hadess@hadess.net>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 3 as published by
* the Free Software Foundation.
*
*/
#pragma once
#include <gudev/gudev.h>
#include <gio/gio.h>
char * ppd_utils_get_sysfs_path (const char *filename);
gboolean ppd_utils_write (const char *filename,
const char *value,
GError **error);
gboolean ppd_utils_write_sysfs (GUdevDevice *device,
const char *attribute,
const char *value,
GError **error);
gboolean ppd_utils_write_sysfs_int (GUdevDevice *device,
const char *attribute,
gint64 value,
GError **error);
GFileMonitor *ppd_utils_monitor_sysfs_attr (GUdevDevice *device,
const char *attribute,
GError **error);
GUdevDevice *ppd_utils_find_device (const char *subsystem,
GCompareFunc func,
gpointer user_data);