From: acme@ghostprotocols.net (Arnaldo Carvalho de Melo)
To: sparclinux@vger.kernel.org
Subject: Re: [sparc32] Kernel module to control front LED
Date: Tue, 27 Sep 2005 21:18:59 +0000 [thread overview]
Message-ID: <20050927211859.GD15421@mandriva.com> (raw)
In-Reply-To: <20050826192113.02c642a4@huginn.midgard.yggdrasill>
Em Tue, Sep 27, 2005 at 01:28:28PM -0700, David S. Miller escreveu:
> From: Metalhead <metalhead@metalhead.ws>
> Date: Fri, 26 Aug 2005 19:21:13 +0200
>
> > I've written a kernel module that allows you to control the fron
> > LED on Sparcstations via /proc. It can also be compiled into the
> > kernel, supporting display of the system load (a la NetBSD and
> > OpenBSD) then.
> >
> > Please find the patch against a vanilla 2.4.30 tree included. The
> > sources and the patch can also be found at
> > http://www.metalhead.ws/led.tar.gz.
>
> Thanks for the submission, looks cool.
>
> Can I suggest one cleanup?
>
> + } else if((*buf > '0') && (*buf <= '9')) { /* 0 would cause division by
> + zero */
> + for(l = 0; *buf != '\0'; buf++) { /* convert to number */
> + l = 10 * l + (*buf - '0');
> + }
> + print_debug("Starting to blink...");
> + led_blink(l);
>
> The kernel has a library function called simple_strtoul() which
> you should probably use instead of this hand-crafted version.
>
> Also, when you resubmit with this fixed, please provide a
> "Signed-off-by: " for yourself so that I can apply your patch.
>
> Thanks a lot.
Is this in any way similar to what the guardian service processor in
PARISC64 machines provide? I.e. one can see what the leds in the machine
front panel remotely :-)
- Arnaldo
GSP>
********** VIRTUAL FRONT PANEL **********
System Boot detected
*****************************************
LEDs: RUN ATTENTION FAULT REMOTE POWER
FLASH FLASH OFF ON ON
LED State: Running non-OS code. Non-critical error detected.
Check Chassis and Console Logs for error messages.
platform config
next prev parent reply other threads:[~2005-09-27 21:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-26 17:21 [sparc32] Kernel module to control front LED Metalhead
2005-09-27 20:28 ` David S. Miller
2005-09-27 21:18 ` Arnaldo Carvalho de Melo [this message]
2005-09-27 22:09 ` David S. Miller
2005-09-28 0:39 ` Eric Brower
2005-09-28 0:48 ` Arnaldo Carvalho de Melo
2005-09-28 4:38 ` David S. Miller
2005-09-28 7:09 ` Christian Joensson
2005-09-28 14:28 ` Metalhead
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050927211859.GD15421@mandriva.com \
--to=acme@ghostprotocols.net \
--cc=sparclinux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.