linux-8086.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jody Bruchon <jody@jodybruchon.com>
To: ELKS <linux-8086@vger.kernel.org>
Subject: New feature: a "poweroff" command
Date: Wed, 25 May 2016 21:51:16 -0400	[thread overview]
Message-ID: <b9258ff8-c7ee-2e05-e5f4-f9456721a9cb@jodybruchon.com> (raw)

I have just committed a 'poweroff' command to ELKS. Piggybacking on the 
existing sys_reboot() syscall, the commit uses Advanced Power Management 
(APM) BIOS calls to power down the computer when the poweroff command is 
issued. If you're running in an emulator like QEMU, Bochs, or 
Virtualbox, or if you're running ELKS on any APM-enabled platform such 
as most 486 or higher laptops and any older ATX PC, this is a much more 
convenient way to shut down.

I find this to be a nicer way of exiting the QEMU curses interface than 
ESC, 2, q, [enter] in any case, and most ELKS testing seems to be done 
on more modern systems and emulators, so it makes sense. I would like 
someone to test it on a non-APM system to make sure that a failure due 
to no APM support falls through to an error message.

Also, I am thinking of renaming sys_reboot() to sys_shutdown() to better 
reflect its actual purpose. Any objections?

-Jody

             reply	other threads:[~2016-05-26  1:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-26  1:51 Jody Bruchon [this message]
     [not found] ` <CACpuWUkhdKqRvae7NiY9rDTMzpnv_Qxaftp3FpPcBEDsfppWLw@mail.gmail.com>
2016-05-26  9:31   ` Fwd: New feature: a "poweroff" command Marc-François LUCCA-DANIAU
     [not found]     ` <CAMKR1yvd_Ce+ARQbt1yQbZbLjBp039c=b1KH-C6_8GP8TzQRHg@mail.gmail.com>
     [not found]       ` <CACpuWU=KnPFMTo5QR9c+WYVsKuziVOpNtqY+ae99h2tt=iP_uQ@mail.gmail.com>
2016-05-26 12:02         ` Fwd: " Marc-François LUCCA-DANIAU
2016-05-26 12:12           ` Jody Bruchon
2016-05-26 12:21           ` Alan Cox

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=b9258ff8-c7ee-2e05-e5f4-f9456721a9cb@jodybruchon.com \
    --to=jody@jodybruchon.com \
    --cc=linux-8086@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).