[BRLTTY] BRLTTY in GRUB2

Vladimir 'φ-coder/phcoder' Serbinenko phcoder at gmail.com
Thu Mar 29 12:35:39 EDT 2012


On 29.03.2012 18:01, Dave Mielke wrote:
> The help,version,verify options now return rather than exit.
>
> Did you add a #define which we can use to detect a Grub build?
Yes, I did in local version. It's GRUB_RUNTIME.
> What does opening a file yield (file descriptor, stdio stream, ...), and how 
> can we passively test if input is available?

typedef struct grub_file *grub_file_t;
grub_file_t grub_file_open (const char *name);
grub_ssize_t grub_file_read (grub_file_t file, void *buf,
                      grub_size_t len);
grub_off_t grub_file_seek (grub_file_t file, grub_off_t offset);
grub_err_t grub_file_close (grub_file_t file);

I've added a layer to have fopen/fread/fclose (preferred) and
open/read/close.
int grub_getkey_noblock (void);
Returns GRUB_TERM_NO_KEY if no key is available.

> Same questions for a serial device. int grub_serial_port_fetch (struct
grub_serial_port *port);

Returns -1 if no key is available.
Note that both grub_getkey_noblock and grub_serial_port_fetch consume
the character/key if one is available but don't wait if none is.

>


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 294 bytes
Desc: OpenPGP digital signature
URL: <http://mielke.cc/pipermail/brltty/attachments/20120329/4bc283ca/attachment.sig>


More information about the BRLTTY mailing list