summaryrefslogtreecommitdiff
path: root/sysutils/xfce4-power-manager/files/patch-src_xfpm-backlight-helper.c
diff options
context:
space:
mode:
authorGuido Falsi <madpilot@FreeBSD.org>2021-01-02 16:36:33 +0000
committerGuido Falsi <madpilot@FreeBSD.org>2021-01-02 16:36:33 +0000
commitb2f2269daff8c7e224099d352e652241fbdfcb7b (patch)
tree27b902ea7af0a7d6abc54b964847536e36093b87 /sysutils/xfce4-power-manager/files/patch-src_xfpm-backlight-helper.c
parentUpdate to upstream release 21.01. (diff)
Welcome XFCE 4.16 to the FreeBSD ports tree!
Upstream announce: https://xfce.org/about/news/?post=1608595200 This XFCE release dropped support for GTK2 plugins and also dropped GTK2 from all components. WARNING: please check UPDATING before upgrading your packages. In case of problems also read the libexo pkg-message. Due to this some panel plugins and libraries will be removed since they cannot compile anymore: - print/xfce4-print - x11/xfce4-quicklauncher-plugin - x11/xfce4-wmdock-plugin - x11-toolkits/libxfce4gui These further components also fail to build or work and are being marked BROKEN, deprecated and marked for removal: - science/xfce4-equake-plugin - x11/xfce4-embed-plugin - deskutils/orage - deskutils/xfce4-volumed [1] deskutils/xfce4-notes-plugin will be also marked BROKEN, but there is active development in it's upstream repository and a fixed release is expected soon. deskutils/xfce4-generic-slider will also be marked broken, since it fails to compile. [2] Thanks also to riggs, Olivier Duchateau <duchateau.olivier@gmail.com> and the people in Approved and Reviewed lines below for help and contributions. Reviewed by: woodsb02 Approved by: sergey.dyatko@gmail.com (maintainer) [1], ehaupt [2] Differential Revision: https://reviews.freebsd.org/D27846
Notes
Notes: svn path=/head/; revision=559953
Diffstat (limited to 'sysutils/xfce4-power-manager/files/patch-src_xfpm-backlight-helper.c')
-rw-r--r--sysutils/xfce4-power-manager/files/patch-src_xfpm-backlight-helper.c56
1 files changed, 28 insertions, 28 deletions
diff --git a/sysutils/xfce4-power-manager/files/patch-src_xfpm-backlight-helper.c b/sysutils/xfce4-power-manager/files/patch-src_xfpm-backlight-helper.c
index 087f2ed85bc1..690e60d19477 100644
--- a/sysutils/xfce4-power-manager/files/patch-src_xfpm-backlight-helper.c
+++ b/sysutils/xfce4-power-manager/files/patch-src_xfpm-backlight-helper.c
@@ -1,42 +1,42 @@
---- src/xfpm-backlight-helper.c.orig 2017-11-23 23:52:06 UTC
+--- src/xfpm-backlight-helper.c.orig 2020-01-26 23:15:39 UTC
+++ src/xfpm-backlight-helper.c
@@ -49,6 +49,8 @@
- #define EXIT_CODE_INVALID_USER 4
- #define EXIT_CODE_NO_BRIGHTNESS_SWITCH 5
+ #define EXIT_CODE_INVALID_USER 4
+ #define EXIT_CODE_NO_BRIGHTNESS_SWITCH 5
-+#define MAX_DEVICE_NUM 8
++#define MAX_DEVICE_NUM 8
+
#if !defined(BACKEND_TYPE_FREEBSD)
- #define BACKLIGHT_SYSFS_LOCATION "/sys/class/backlight"
- #define BRIGHTNESS_SWITCH_LOCATION "/sys/module/video/parameters/brightness_switch_enabled"
+ #define BACKLIGHT_SYSFS_LOCATION "/sys/class/backlight"
+ #define BRIGHTNESS_SWITCH_LOCATION "/sys/module/video/parameters/brightness_switch_enabled"
@@ -204,19 +206,23 @@ backlight_helper_get_device (void)
- /* devices in priority order */
- gchar *types[] = { "lcd", "crt", "out", "ext", "tv", NULL };
- gchar *device = NULL;
-- gint i;
-+ gint i, j;
+ /* devices in priority order */
+ gchar *types[] = { "lcd", "crt", "out", "ext", "tv", NULL };
+ gchar *device = NULL;
+- gint i;
++ gint i, j;
-- device = (gchar *) g_malloc (sizeof (gchar));
-+ device = (gchar *) g_malloc (sizeof (gchar) * 8);
+- device = (gchar *) g_malloc (sizeof (gchar));
++ device = (gchar *) g_malloc (sizeof (gchar) * 8);
- for (i = 0; types[i] != NULL; i++) {
-- g_snprintf (device, (gulong) strlen (types[i]), "%s0", types[i]);
-+ for (j = 0; j < MAX_DEVICE_NUM; j++) {
-+ g_snprintf (device, 8, "%s%i", types[i], j);
+ for (i = 0; types[i] != NULL; i++) {
+- g_snprintf (device, (gulong) strlen (types[i]), "%s0", types[i]);
++ for (j = 0; j < MAX_DEVICE_NUM; j++) {
++ g_snprintf (device, 8, "%s%i", types[i], j);
-- /* stop, when first device is found */
-- if (acpi_video_is_enabled (device))
-- break;
-+ /* stop, when first device is found */
-+ if (acpi_video_is_enabled (device))
-+ return (device);
-+ }
- }
+- /* stop, when first device is found */
+- if (acpi_video_is_enabled (device))
+- break;
++ /* stop, when first device is found */
++ if (acpi_video_is_enabled (device))
++ return (device);
++ }
+ }
-- return device;
-+ g_free (device);
+- return device;
++ g_free (device);
+
-+ return (NULL);
++ return (NULL);
}
/*