Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 702550
Collapse All | Expand All

(-)xfce4-session-4.14.0.orig/libxfsm/xfsm-shutdown-common.h (+4 lines)
Lines 32-37 Link Here
32
#ifdef UP_BACKEND_HIBERNATE_COMMAND
32
#ifdef UP_BACKEND_HIBERNATE_COMMAND
33
#undef UP_BACKEND_HIBERNATE_COMMAND
33
#undef UP_BACKEND_HIBERNATE_COMMAND
34
#endif
34
#endif
35
#ifdef UP_BACKEND_HYBRIDSLEEP_COMMAND
36
#undef UP_BACKEND_HYBRIDSLEEP_COMMAND
37
#endif
35
38
36
/* On FreeBSD, NetBSD and DragonFly BSD users with write access to
39
/* On FreeBSD, NetBSD and DragonFly BSD users with write access to
37
 * /dev/acpi can suspend/hibernate the system */
40
 * /dev/acpi can suspend/hibernate the system */
Lines 63-68 Link Here
63
#ifdef BACKEND_TYPE_LINUX
66
#ifdef BACKEND_TYPE_LINUX
64
#define UP_BACKEND_SUSPEND_COMMAND "/usr/sbin/pm-suspend"
67
#define UP_BACKEND_SUSPEND_COMMAND "/usr/sbin/pm-suspend"
65
#define UP_BACKEND_HIBERNATE_COMMAND "/usr/sbin/pm-hibernate"
68
#define UP_BACKEND_HIBERNATE_COMMAND "/usr/sbin/pm-hibernate"
69
#define UP_BACKEND_HYBRIDSLEEP_COMMAND "/usr/sbin/pm-suspend-hybrid"
66
#endif
70
#endif
67
71
68
#ifdef BACKEND_TYPE_OPENBSD
72
#ifdef BACKEND_TYPE_OPENBSD
(-)xfce4-session-4.14.0.orig/xfsm-shutdown-helper/main.c (-1 / +14 lines)
Lines 119-130 Link Here
119
  gboolean restart = FALSE;
119
  gboolean restart = FALSE;
120
  gboolean suspend = FALSE;
120
  gboolean suspend = FALSE;
121
  gboolean hibernate = FALSE;
121
  gboolean hibernate = FALSE;
122
  gboolean hybridsleep = FALSE;
122
123
123
  const GOptionEntry options[] = {
124
  const GOptionEntry options[] = {
124
    { "shutdown",  '\0', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &shutdown, "Shutdown the system", NULL },
125
    { "shutdown",  '\0', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &shutdown, "Shutdown the system", NULL },
125
    { "restart",   '\0', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &restart, "Restart the system", NULL },
126
    { "restart",   '\0', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &restart, "Restart the system", NULL },
126
    { "suspend",   '\0', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &suspend, "Suspend the system", NULL },
127
    { "suspend",   '\0', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &suspend, "Suspend the system", NULL },
127
    { "hibernate", '\0', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &hibernate, "Hibernate the system", NULL },
128
    { "hibernate", '\0', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &hibernate, "Hibernate the system", NULL },
129
    { "hybrid-sleep", '\0', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &hybridsleep, "Hybrid sleep", NULL },
128
    { NULL }
130
    { NULL }
129
  };
131
  };
130
132
Lines 135-141 Link Here
135
  g_option_context_free (context);
137
  g_option_context_free (context);
136
138
137
  /* no input */
139
  /* no input */
138
  if (!shutdown && !restart && !suspend && !hibernate)
140
  if (!shutdown && !restart && !suspend && !hibernate && !hybridsleep)
139
    {
141
    {
140
      puts ("No valid option was specified");
142
      puts ("No valid option was specified");
141
      return EXIT_CODE_ARGUMENTS_INVALID;
143
      return EXIT_CODE_ARGUMENTS_INVALID;
Lines 198-203 Link Here
198
          {
200
          {
199
            return EXIT_CODE_SUCCESS;
201
            return EXIT_CODE_SUCCESS;
200
          }
202
          }
203
        else
204
          {
205
            return EXIT_CODE_FAILED;
206
          }
207
    }
208
  else if(hybridsleep)
209
    {
210
      if (run (UP_BACKEND_HYBRIDSLEEP_COMMAND))
211
          {
212
            return EXIT_CODE_SUCCESS;
213
          }
201
        else
214
        else
202
          {
215
          {
203
            return EXIT_CODE_FAILED;
216
            return EXIT_CODE_FAILED;

Return to bug 702550