All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Millan <rmh@aybabtu.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] Detect key modifier status in 'sleep --interruptible'
Date: Fri, 28 Aug 2009 14:44:15 +0200	[thread overview]
Message-ID: <20090828124415.GB15030@thorin> (raw)
In-Reply-To: <20090826202606.GR11691@riva.ucam.org>

On Wed, Aug 26, 2009 at 09:26:06PM +0100, Colin Watson wrote:
> > 
> > I'm still not convinced that we want the sleep bits.  They seem too ad-hoc,
> > and I'd like to hear what others think first.
> > 
> > But if I understood correctly, you plan on using keystatus command only?
> 
> If GRUB_HIDDEN_TIMEOUT is set to a non-zero value, I would use sleep
> rather than keystatus, I think. (At least, if I decided I wanted to
> support that configuration; I'm not quite sure yet.) In that case I'd
> want the sleep to be interruptible by pressing Shift for consistency
> with the zero-delay case.
> 
> However, since this is essentially an artifact of our configuration and
> doesn't introduce any new configuration file words, I could keep this
> part as an Ubuntu-specific patch with relatively little trouble.

Please do for now.  I'd rather not rush when discussing this part.

> > > +static int
> > > +grub_console_getkeystatus (void)
> > > +{
> > > +  grub_uint8_t status = bios_data_area->keyboard_flag_lower;
> > > +  int mods = 0;
> > > +
> > > +  if (status & 0x03)
> > > +    mods |= GRUB_TERM_STATUS_SHIFT;
> > > +  if (status & 0x04)
> > > +    mods |= GRUB_TERM_STATUS_CTRL;
> > > +  if (status & 0x08)
> > > +    mods |= GRUB_TERM_STATUS_ALT;
> > > +
> > > +  return mods;
> > > +}
> > 
> > This should be macroified (but for the time being, I have no problem with
> > our internal representation matching the one in BIOS Data Area, hence no
> > translation would be needed on i386-pc).
> 
> Vladimir objected to the inconsistency between distinguishing left and
> right Shift but not left and right Control or Alt, which is why our
> internal representation does not currently match. I agree it's clearer
> to macroify things.

Looks fine now, thanks.

> OK, and doing so helped me notice that I'd left a Get_Idle request in
> there by mistake from debugging. Updated patch follows. There are a few
> changes unrelated to the main body of the patch as a result; do you want
> these split out?

No need, this looks good.  Please commit.

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."



  reply	other threads:[~2009-08-28 12:44 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-12 15:35 [PATCH] Detect key modifier status in 'sleep --interruptible' Colin Watson
2009-08-12 16:10 ` Vladimir 'phcoder' Serbinenko
2009-08-12 16:15   ` Vladimir 'phcoder' Serbinenko
2009-08-12 22:14   ` Colin Watson
2009-08-13 20:52     ` Robert Millan
2009-08-13 21:15       ` Colin Watson
2009-08-23 22:46     ` Vladimir 'phcoder' Serbinenko
2009-08-23 22:56       ` Robert Millan
2009-08-23 23:00         ` Vladimir 'phcoder' Serbinenko
2009-08-23 23:03           ` Robert Millan
2009-08-23 23:05             ` Vladimir 'phcoder' Serbinenko
2009-08-25 19:26         ` Robert Millan
2009-08-24  9:24       ` Colin Watson
2009-08-24 12:23         ` Robert Millan
2009-08-24 12:44           ` Robert Millan
2009-08-24 13:27           ` Colin Watson
2009-08-24 14:28             ` Robert Millan
2009-08-24 16:23               ` Colin Watson
2009-08-24 16:56                 ` Colin Watson
2009-08-24 17:03               ` Colin Watson
2009-08-24 22:04           ` Colin Watson
2009-08-24 22:41             ` Robert Millan
2009-08-24 23:02               ` Colin Watson
2009-08-26 15:33                 ` Colin Watson
2009-08-26 18:39                   ` Robert Millan
2009-08-26 20:26                     ` Colin Watson
2009-08-28 12:44                       ` Robert Millan [this message]
2009-08-28 13:20                         ` Colin Watson
2009-08-24 12:56         ` Robert Millan
2009-08-13 20:46 ` Robert Millan
2009-08-23 22:27 ` Robert Millan
2009-08-23 22:41   ` Vladimir 'phcoder' Serbinenko
2009-08-23 22:57     ` Robert Millan
2009-08-24  9:11   ` Colin Watson
2009-08-24 11:57     ` Robert Millan
2009-08-24 12:50       ` Vladimir 'phcoder' Serbinenko
2009-08-24 12:58       ` Michal Suchanek
2009-08-24 14:29         ` Robert Millan
2009-08-24 12:59       ` Colin Watson
2009-08-24 13:27       ` Robert Millan

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=20090828124415.GB15030@thorin \
    --to=rmh@aybabtu.com \
    --cc=grub-devel@gnu.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.