Re: grub-probe detects ext4 wronly as ext2

2008-07-03 Thread Bean
Hi, First of all, grub-setup is conservative enough. It read the data twice, one using host os, one using grub, and compare result. If the data is corrupted, the comparison will fail and it will refuse to install. This is an example of good practice, which check the driver by function, not by fla

[PATCH] Drivemap module

2008-07-03 Thread Javier Martín
Just an updated version of the patch that adds support for device-like names instead of raw BIOS disk numbers, i.e. this is now supported: grub> drivemap (hd0) (hd1) In addition to the already supported: grub> drivemap (hd0) 0x81 The effect is the same: the second BIOS hard drive wi

Re: grub-probe detects ext4 wronly as ext2

2008-07-03 Thread Javier Martín
And, after writing all that, I forgot to append the patch. Sigh. Index: fs/ext2.c === --- fs/ext2.c (revisión: 1687) +++ fs/ext2.c (copia de trabajo) @@ -50,6 +50,7 @@ #include #include #include +#include /* Log2 size of ext

Re: grub-probe detects ext4 wronly as ext2

2008-07-03 Thread Javier Martín
El vie, 04-07-2008 a las 02:08 +0200, Robert Millan escribió: > On Thu, Jul 03, 2008 at 07:07:55PM +0200, Javier Martín wrote: > > > The question here is whether we should increase complexity with interfaces > > > that don't provide any usefulness to the user, just to make it easier to > > > do pot

Re: grub-probe detects ext4 wronly as ext2

2008-07-03 Thread Robert Millan
On Thu, Jul 03, 2008 at 07:07:55PM +0200, Javier Martín wrote: > > The question here is whether we should increase complexity with interfaces > > that don't provide any usefulness to the user, just to make it easier to > > do potentially dangerous things. If a user understands the implications > >

Re: [PATCH] disk/fs_uuid.c

2008-07-03 Thread Robert Millan
On Fri, Jul 04, 2008 at 12:50:21AM +0200, Robert Millan wrote: > > I _did_ extend the search command (before this patch). The reason for > providing this is basicaly that it makes grub.cfg more readable (and easier > to understand), and can't be used outside the context of scripting (for > exampl

Re: [PATCH] pc & gpt partmap iterators don't abort when their hook requests it

2008-07-03 Thread Robert Millan
On Thu, Jul 03, 2008 at 08:31:05PM +0200, Marco Gerards wrote: > Robert Millan <[EMAIL PROTECTED]> writes: > > > On Tue, Jul 01, 2008 at 03:25:32PM +0200, Robert Millan wrote: > >> > >> See ChangeLog for description. I'd really like to receive some review on > >> this one, since the code it touc

Re: [PATCH] Save/Load environment variable support

2008-07-03 Thread Robert Millan
On Fri, Jul 04, 2008 at 04:11:07AM +0800, Bean wrote: > > BTW, I think update-grub should create a new grubenv if it doesn't > exists, so that user won't see the file not found error. Would be interesting if update-grub added a "savedefault" blob to each menuentry, and loaded the default afterwar

Re: [PATCH] disk/fs_uuid.c

2008-07-03 Thread Robert Millan
On Thu, Jul 03, 2008 at 09:05:54PM +0200, Marco Gerards wrote: > Robert Millan <[EMAIL PROTECTED]> writes: > > > This disk driver allows access to partitions that contain a filesystem with > > known UUID via "(UUID=xxx)" syntax. > > > > The iterator is unimplemented on purpose, because it make

Re: [PATCH] Save/Load environment variable support

2008-07-03 Thread Bean
On Fri, Jul 4, 2008 at 4:41 AM, Marco Gerards <[EMAIL PROTECTED]> wrote: > Pavel Roskin <[EMAIL PROTECTED]> writes: > >> On Thu, 2008-07-03 at 20:04 +0200, Marco Gerards wrote: >> >>> Great! Can you explain how it works? >> >> Very good question. It's not "discoverable". I could not find way to

Re: [PATCH] Enable writing to ATA devices, fix several bugs

2008-07-03 Thread Pavel Roskin
On Thu, 2008-07-03 at 20:27 +0200, Marco Gerards wrote: > The more patches I get, the better ;-) > > > ChangeLog: > > > > * disk/ata.c (grub_ata_pio_write): Check status before writing, > > like we do in grub_ata_pio_read(). > > > > (grub_ata_readwrite): Always write individual sector

Re: [PATCH] Save/Load environment variable support

2008-07-03 Thread Marco Gerards
Pavel Roskin <[EMAIL PROTECTED]> writes: > On Thu, 2008-07-03 at 20:04 +0200, Marco Gerards wrote: > >> Great! Can you explain how it works? > > Very good question. It's not "discoverable". I could not find way to > figure out that /boot/grub/grubenv is the default without looking at the > code

Re: [PATCH] LZMA support in i386-pc kernel

2008-07-03 Thread Javier Martín
El vie, 04-07-2008 a las 03:59 +0800, Bean escribió: > On Fri, Jul 4, 2008 at 3:37 AM, Isaac Dupree > <[EMAIL PROTECTED]> wrote: > > by the way, is LZMA decoding slow enough to be noticable on old machines, > > every boot time? (say, more than 1 second to decode core.img?) > > The code is highly o

Re: [PATCH] Save/Load environment variable support

2008-07-03 Thread Bean
On Fri, Jul 4, 2008 at 2:09 AM, Pavel Roskin <[EMAIL PROTECTED]> wrote: > On Thu, 2008-07-03 at 20:04 +0200, Marco Gerards wrote: > >> Great! Can you explain how it works? > > Very good question. It's not "discoverable". I could not find way to > figure out that /boot/grub/grubenv is the default

Re: [PATCH] LZMA support in i386-pc kernel

2008-07-03 Thread Bean
On Fri, Jul 4, 2008 at 3:37 AM, Isaac Dupree <[EMAIL PROTECTED]> wrote: > by the way, is LZMA decoding slow enough to be noticable on old machines, > every boot time? (say, more than 1 second to decode core.img?) The code is highly optimized for size, speed may hurt a little bit. But anyway, today

Re: [PATCH] New x86_64 EFI patch

2008-07-03 Thread Bean
On Fri, Jul 4, 2008 at 2:11 AM, Marco Gerards <[EMAIL PROTECTED]> wrote: > Hi, > > Bean <[EMAIL PROTECTED]> writes: > >> This new patch add the following function to the original x86_64 EFI patch: >> >> 1, Fix menu drawing problem >> It maps the unicode char to EFI char so that the rectangle box is

Re: [PATCH] LZMA support in i386-pc kernel

2008-07-03 Thread Isaac Dupree
by the way, is LZMA decoding slow enough to be noticable on old machines, every boot time? (say, more than 1 second to decode core.img?) -Isaac ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel

Re: Eliminating grub_size_t

2008-07-03 Thread Pavel Roskin
On Thu, 2008-07-03 at 22:07 +0300, Vesa Jääskeläinen wrote: > And size_t is kinda connected to memory addresses. Do you agree :) ? Yes. However, size_t should hold the maximal structure size, and we can limit it to 4 (or even 2) gigabytes. You can think of it as of the size of a contiguous chun

Re: Eliminating grub_size_t

2008-07-03 Thread Vesa Jääskeläinen
Pavel Roskin wrote: On Thu, 2008-07-03 at 21:42 +0300, Vesa Jääskeläinen wrote: I think I'll try to make grub_size_t 32-bit everywhere and see if it's going to make any difference or help discover some issues. Why? I would let it be optimal type for current memory bus width. int is supposed

Re: Eliminating grub_size_t

2008-07-03 Thread Pavel Roskin
On Thu, 2008-07-03 at 20:56 +0200, Marco Gerards wrote: > Pavel Roskin <[EMAIL PROTECTED]> writes: > > I think I'll try to make grub_size_t 32-bit everywhere and see if it's > > going to make any difference or help discover some issues. > > Please don't. I'd rather stick to integers, such change

Re: [PATCH] disk/fs_uuid.c

2008-07-03 Thread Marco Gerards
Robert Millan <[EMAIL PROTECTED]> writes: > This disk driver allows access to partitions that contain a filesystem with > known UUID via "(UUID=xxx)" syntax. > > The iterator is unimplemented on purpose, because it makes the code smaller > and it isn't useful to waste time inspecting the same

Re: [PATCH] LZMA support in i386-pc kernel

2008-07-03 Thread Bean
On Fri, Jul 4, 2008 at 2:24 AM, Marco Gerards <[EMAIL PROTECTED]> wrote: > Hi, > > Bean <[EMAIL PROTECTED]> writes: > >> This is the new patch. > > Can you please include a changelog entry? Hi, Oh, this is the changelog 2008-07-04 Bean <[EMAIL PROTECTED]> * Makefile.in (enable_lzo): N

Re: Eliminating grub_size_t

2008-07-03 Thread Pavel Roskin
On Thu, 2008-07-03 at 21:42 +0300, Vesa Jääskeläinen wrote: > > I think I'll try to make grub_size_t 32-bit everywhere and see if it's > > going to make any difference or help discover some issues. > > Why? I would let it be optimal type for current memory bus width. int is supposed to be the op

Re: [PATCH] Loading windows in macbook

2008-07-03 Thread Marco Gerards
Bean <[EMAIL PROTECTED]> writes: > On Fri, Jul 4, 2008 at 2:40 AM, Marco Gerards <[EMAIL PROTECTED]> wrote: >> Hi, >> >> Bean <[EMAIL PROTECTED]> writes: >> >>> Oh, actually a20 of macbook can be disabled with fast a20 port 92. >>> However, the current a20 code do the keyboard controller test befo

Re: Eliminating grub_size_t

2008-07-03 Thread Marco Gerards
Pavel Roskin <[EMAIL PROTECTED]> writes: > On Thu, 2008-07-03 at 20:02 +0200, Marco Gerards wrote: >> > I know what it is. I believe int should be as good as size_t for most >> > purposes is we are not working with very large structures or read >> > gigabytes of data from files at once. >> >> Pe

Re: [PATCH] Fix warning in fs/xfs.c

2008-07-03 Thread Pavel Roskin
On Thu, 2008-07-03 at 20:21 +0200, Marco Gerards wrote: > Pavel Roskin <[EMAIL PROTECTED]> writes: > > > ChangeLog: > > * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to > > those in Linux XFS code. Provide a way to access 64-bit parent > > inode. > > (grub_xfs_iterate

Re: [RFC] High resolution time support using x86 TSC

2008-07-03 Thread Marco Gerards
Hi Colin, Colin D Bennett <[EMAIL PROTECTED]> writes: > I have implemented high resolution time support (through the > new grub_get_time_ms() function) using the RDTSC instruction available > on Pentium and higher x86 CPUs. The TSC value is simply a 64-bit block > cycle counter that is zeroed at

Re: [PATCH] Loading windows in macbook

2008-07-03 Thread Bean
On Fri, Jul 4, 2008 at 2:40 AM, Marco Gerards <[EMAIL PROTECTED]> wrote: > Hi, > > Bean <[EMAIL PROTECTED]> writes: > >> Oh, actually a20 of macbook can be disabled with fast a20 port 92. >> However, the current a20 code do the keyboard controller test before >> trying port 92, which cause it to ha

Re: Eliminating grub_size_t

2008-07-03 Thread Vesa Jääskeläinen
Pavel Roskin wrote: On Thu, 2008-07-03 at 20:02 +0200, Marco Gerards wrote: I know what it is. I believe int should be as good as size_t for most purposes is we are not working with very large structures or read gigabytes of data from files at once. Perhaps, but it doesn't hurt either. I thin

Re: [PATCH] Loading windows in macbook

2008-07-03 Thread Marco Gerards
Hi, Bean <[EMAIL PROTECTED]> writes: > Oh, actually a20 of macbook can be disabled with fast a20 port 92. > However, the current a20 code do the keyboard controller test before > trying port 92, which cause it to hang. To fix it, I only need to > adjust the order of tests. What is the order you

Re: Eliminating grub_size_t

2008-07-03 Thread Pavel Roskin
On Thu, 2008-07-03 at 20:02 +0200, Marco Gerards wrote: > > I know what it is. I believe int should be as good as size_t for most > > purposes is we are not working with very large structures or read > > gigabytes of data from files at once. > > Perhaps, but it doesn't hurt either. I think it is

Re: [PATCH] pc & gpt partmap iterators don't abort when their hook requests it

2008-07-03 Thread Marco Gerards
Robert Millan <[EMAIL PROTECTED]> writes: > On Tue, Jul 01, 2008 at 03:25:32PM +0200, Robert Millan wrote: >> >> See ChangeLog for description. I'd really like to receive some review on >> this one, since the code it touches is so fragile (although I tested it on a >> typical setup and it works)

Re: [PATCH] Enable writing to ATA devices, fix several bugs

2008-07-03 Thread Marco Gerards
Pavel Roskin <[EMAIL PROTECTED]> writes: > We have save_env now, so we can use the write capability. This also > fixes the last compiler warning in GRUB. Great! > Sorry, Marco, please ignore the previous message, as it didn't get to > the list. The more patches I get, the better ;-) > ChangeL

Re: [PATCH] LZMA support in i386-pc kernel

2008-07-03 Thread Marco Gerards
Hi, Bean <[EMAIL PROTECTED]> writes: > This is the new patch. Can you please include a changelog entry? -- Marco ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel

Re: [PATCH] Fix warning in fs/xfs.c

2008-07-03 Thread Marco Gerards
Pavel Roskin <[EMAIL PROTECTED]> writes: > ChangeLog: > * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to > those in Linux XFS code. Provide a way to access 64-bit parent > inode. > (grub_xfs_iterate_dir): Use the new names. Avoid reading past > the end

Re: [PATCH] Save/Load environment variable support

2008-07-03 Thread Pavel Roskin
On Thu, 2008-07-03 at 20:04 +0200, Marco Gerards wrote: > Great! Can you explain how it works? Very good question. It's not "discoverable". I could not find way to figure out that /boot/grub/grubenv is the default without looking at the code. load_env without arguments merely prints "error: f

Re: [PATCH] New x86_64 EFI patch

2008-07-03 Thread Marco Gerards
Hi, Bean <[EMAIL PROTECTED]> writes: > This new patch add the following function to the original x86_64 EFI patch: > > 1, Fix menu drawing problem > It maps the unicode char to EFI char so that the rectangle box is > showed properly Doesn't it break other systems? > 2, Handle command line optio

Re: [PATCH] add a counter in grub_dprintf

2008-07-03 Thread Marco Gerards
Robert Millan <[EMAIL PROTECTED]> writes: > How about adding a counter to grub_dprintf to make it easy to instrument > GRUB and find which are the bottlenecks in boot time? > > Sidenote: perhaps it'd be a good idea to conditionalize all grub_dprintf > calls with #ifdef DEBUG to obtain a smaller co

Re: [PATCH] Save/Load environment variable support

2008-07-03 Thread Marco Gerards
Bean <[EMAIL PROTECTED]> writes: > On Tue, Jul 1, 2008 at 11:54 PM, Robert Millan <[EMAIL PROTECTED]> wrote: >> On Mon, Jun 30, 2008 at 09:06:28PM +0800, Bean wrote: >>> Hi, >>> >>> This is the new patch, some changes: >>> >>> 1, envblk.h, remove GRUB_ENVBLK_RDIR and the like, they're not needed >

Re: Eliminating grub_size_t

2008-07-03 Thread Marco Gerards
Pavel Roskin <[EMAIL PROTECTED]> writes: > On Wed, 2008-07-02 at 20:46 +0300, Vesa Jääskeläinen wrote: > >> If reiserfs is using it in wrong place, fix the reiserfs. If you are >> reading some file system variable, then you should use grub_uintN_t to >> specify storage size in bits. > > OK, I'll

Re: grub-probe detects ext4 wronly as ext2

2008-07-03 Thread Javier Martín
El jue, 03-07-2008 a las 16:02 +0200, Robert Millan escribió: > On Wed, Jul 02, 2008 at 09:32:40PM +0200, Javier Martín wrote: > > El mié, 02-07-2008 a las 16:22 +0200, Robert Millan escribió: > > > On Wed, Jul 02, 2008 at 01:28:47AM +0200, Javier Martín wrote: > > > > > A --ignore-incompatible fla

Re: grub-probe detects ext4 wronly as ext2

2008-07-03 Thread Isaac Dupree
Robert Millan wrote: A more elegant solution (also may be interesting for security at some point) would be for update-grub to hash each file it generates access commands for and embed the sum in grub.cfg as a check parameter, like if verify_hash /file x ; then do_something_with_file /f

Re: [PATCH] Enable writing to ATA devices, fix several bugs

2008-07-03 Thread Robert Millan
On Wed, Jul 02, 2008 at 08:17:16PM -0400, Pavel Roskin wrote: > + if (grub_ata_regget (dev, GRUB_ATA_REG_STATUS) & 1) > +return grub_ata_regget (dev, GRUB_ATA_REG_ERROR); May I suggest a macro to describe this "1"? -- Robert Millan I know my rights; I want my phone call! What good is a p

Re: [PATCH] LZMA support in i386-pc kernel

2008-07-03 Thread Robert Millan
On Wed, Jul 02, 2008 at 11:11:28PM +0800, Bean wrote: > > > > Lenny's most likely going to ship with lzma 4.43. Is that good? > > The c encoder first appears in 4.58 beta. Previous version of lzma > only have cpp version. That's too bad, I guess it'll have to be for lenny+1. > >> +#define FIXED

Re: grub-probe detects ext4 wronly as ext2

2008-07-03 Thread Robert Millan
On Wed, Jul 02, 2008 at 09:32:40PM +0200, Javier Martín wrote: > El mié, 02-07-2008 a las 16:22 +0200, Robert Millan escribió: > > On Wed, Jul 02, 2008 at 01:28:47AM +0200, Javier Martín wrote: > > > > A --ignore-incompatible flag doesn't sound like a nice thing to do; it > > > > means > > > > we