Module Name: src
Committed By: phx
Date: Sun Apr 17 14:05:59 UTC 2011
Modified Files:
src/sys/arch/sandpoint/sandpoint: satmgr.c
Log Message:
DSM-G600: Turn off all LEDs when shutting down, to indicate the device
can be switched off.
To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/sandpoint/sandpoint/satmgr.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/sandpoint/sandpoint/satmgr.c
diff -u src/sys/arch/sandpoint/sandpoint/satmgr.c:1.9 src/sys/arch/sandpoint/sandpoint/satmgr.c:1.10
--- src/sys/arch/sandpoint/sandpoint/satmgr.c:1.9 Sun Apr 10 16:30:32 2011
+++ src/sys/arch/sandpoint/sandpoint/satmgr.c Sun Apr 17 14:05:59 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: satmgr.c,v 1.9 2011/04/10 16:30:32 phx Exp $ */
+/* $NetBSD: satmgr.c,v 1.10 2011/04/17 14:05:59 phx Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -120,6 +120,7 @@
static void kpwroff(struct satmgr_softc *);
static void spwroff(struct satmgr_softc *);
static void qpwroff(struct satmgr_softc *);
+static void dpwroff(struct satmgr_softc *);
static void kbutton(struct satmgr_softc *, int);
static void sbutton(struct satmgr_softc *, int);
static void qbutton(struct satmgr_softc *, int);
@@ -136,7 +137,7 @@
};
static struct satops satmodel[] = {
- { "dlink", NULL, NULL, NULL, dbutton },
+ { "dlink", NULL, NULL, dpwroff, dbutton },
{ "kurobox", NULL, kreboot, kpwroff, kbutton },
{ "qnap", qinit, qreboot, qpwroff, qbutton },
{ "synology", sinit, sreboot, spwroff, sbutton }
@@ -729,6 +730,17 @@
}
static void
+dpwroff(struct satmgr_softc *sc)
+{
+
+ /*
+ * The DSM-G600 has no hardware-shutdown, but we turn all LEDs off,
+ * to indicated that we powered down.
+ */
+ send_sat(sc, "TSC\nTSC\n");
+}
+
+static void
dbutton(struct satmgr_softc *sc, int ch)
{