From: "Javier Martín" <lordhabbit@gmail.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: Eliminating grub_size_t
Date: Wed, 02 Jul 2008 04:33:47 +0200 [thread overview]
Message-ID: <1214966028.9353.95.camel@localhost> (raw)
In-Reply-To: <1214964880.7362.17.camel@dv>
[-- Attachment #1: Type: text/plain, Size: 1459 bytes --]
El mar, 01-07-2008 a las 22:14 -0400, Pavel Roskin escribió:
> Hello!
>
> I wonder if we would be better off without grub_size_t. I cannot think
> of any code that could use it legitimately.
>
> The ordinary size_t is used to represent the result of sizeof, i.e. size
> of a structure. There is no need for grub to support data structures
> exceeding 4 gigabytes. If we want to support more memory, that's fine,
> but that would involve other types that can hold the pointer values,
> such as long.
I'm not sure if I'm getting you right. Are you suggesting that we "undo"
the someinteger->size_t conversion that caused so many headaches in many
32->64 bit ports? Machine-dependant types like size_t and ptrdiff_t are
here to help us, not to haunt us. What is the exact problem with size_t
in GRUB right now? I agree that grub_size_t is redundant, though.
>
> size_t has different size on 32-bit and 64-bit systems, but we should
> strive to make the userspace utilities work like the bootloader, so that
> possible problems can be detected early and debugged easily.
I didn't understand this. What do you mean with "US working like the
bootloader?"
>
> Besides, we cannot even print size_t in grub_printf(), and I don't think
> we should.
1. that can be worked out
2. why not?
>
> grub_size_t should be replaced with int or grub_uint32_t. size_t can be
> used in pure userspace code to call functions that need it.
>
[-- Attachment #2: Esta parte del mensaje está firmada digitalmente --]
[-- Type: application/pgp-signature, Size: 827 bytes --]
next prev parent reply other threads:[~2008-07-02 2:33 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-02 2:14 Eliminating grub_size_t Pavel Roskin
2008-07-02 2:33 ` Javier Martín [this message]
2008-07-02 4:20 ` Pavel Roskin
2008-07-02 10:26 ` Isaac Dupree
2008-07-02 13:23 ` Pavel Roskin
2008-07-02 17:46 ` Vesa Jääskeläinen
2008-07-02 17:51 ` Pavel Roskin
2008-07-03 18:02 ` Marco Gerards
2008-07-03 18:29 ` Pavel Roskin
2008-07-03 18:42 ` Vesa Jääskeläinen
2008-07-03 18:52 ` Pavel Roskin
2008-07-03 19:07 ` Vesa Jääskeläinen
2008-07-03 19:16 ` Pavel Roskin
2008-07-03 18:56 ` Marco Gerards
2008-07-03 19:05 ` Pavel Roskin
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=1214966028.9353.95.camel@localhost \
--to=lordhabbit@gmail.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.