Print this page
7158 powerd shouldn't call autos3 trigger on sparc

@@ -122,14 +122,16 @@
 static char *power_button_cmd[] = {
         "/usr/bin/sys-suspend",
         "-h", "-d", ":0", NULL
 };
 
+#ifdef __x86
 static char *autoS3_cmd[] = {
         "/usr/bin/sys-suspend",
         "-n", "-d", ":0", NULL
 };
+#endif
 
 static char pidpath[] = PIDPATH;
 static char scratch[PATH_MAX];
 static char *prog;
 

@@ -149,11 +151,13 @@
 static void power_button_monitor(void *);
 static int open_pidfile(char *);
 static int write_pidfile(int, pid_t);
 static int read_cpr_config(void);
 static void system_activity_monitor(void);
+#ifdef __x86
 static void autos3_monitor(void);
+#endif
 static void do_attach(void);
 static void *attach_devices(void *);
 static int powerd_debug;
 
 /* PRINTFLIKE1 */

@@ -322,19 +326,21 @@
             (void *(*)(void *))system_activity_monitor, NULL,
             THR_DAEMON, NULL) != 0) {
                 logerror("Unable to create thread to monitor system activity.");
         }
 
+#ifdef __x86
         /*
          * Create a new thread to handle autos3 trigger
          */
         if (powerd_debug)
                 logerror("powerd starting autos3 monitor.");
         if (thr_create(NULL, NULL,
             (void *(*)(void *))autos3_monitor, NULL, THR_DAEMON, NULL) != 0) {
                 logerror("Unable to create thread to monitor autos3 activity.");
         }
+#endif
 
         /*
          * Block until we receive an explicit terminate signal
          */
         (void) sigsuspend(&sigmask);

@@ -385,10 +391,11 @@
         do {
                 (void) sigsuspend(&sigmask);
         } while (errno == EINTR);
 }
 
+#ifdef __x86
 static void
 autos3_monitor(void)
 {
         struct pollfd poll_fd;
         srn_event_info_t srn_event;             /* contains suspend type */

@@ -445,10 +452,11 @@
                 }
                 (void) poweroff("AutoS3", autoS3_cmd);
                 continue;
         }
 }
+#endif
 
 static int
 read_cpr_config(void)
 {
         int     asfd;