[PATCH 2/2] Alias cls as clear

2009-07-22 Thread Joe Auricchio
* commands/minicmd.c: Add clear as alias for cls. My background is in Unix, so 'clear' comes much more naturally to my fingers than 'cls'. But it's bad to clutter grub with too many commands. So I leave this to the maintainers: do we add both commands, only one, or neither? -joe --- a/comma

[PATCH 1/2] Add cls command

2009-07-22 Thread Joe Auricchio
* commands/minicmd.c: Add cls command. It's nice to clear the screen once in a while, after a lot of messing around in the command line. -joe --- a/commands/minicmd.c2009-07-07 16:58:05.0 -0700 +++ b/commands/minicmd.c2009-07-22 15:43:30.0 -0700 @@ -336,8 +336,19

Re: [RFC,PATCH] C99 format specifiers for fixed-length integer types

2009-07-22 Thread Pavel Roskin
On Thu, 2009-07-23 at 04:03 +0200, Javier Martín wrote: > El mié, 22-07-2009 a las 21:08 -0400, Pavel Roskin escribió: > > I doubt about "runtime weirdness". gcc is good at catching such > > problems at the compile time. > Yes, in naked expressions. However, once we start using casts the C > compi

Re: [RFC,PATCH] C99 format specifiers for fixed-length integer types

2009-07-22 Thread Javier Martín
El mié, 22-07-2009 a las 21:08 -0400, Pavel Roskin escribió: > I doubt about "runtime weirdness". gcc is good at catching such > problems at the compile time. Yes, in naked expressions. However, once we start using casts the C compiler tends to be quite silent about the whole nitty-gritty process.

Re: [RFC,PATCH] C99 format specifiers for fixed-length integer types

2009-07-22 Thread Pavel Roskin
On Wed, 2009-07-22 at 21:10 +0200, Javier Martín wrote: > This patch modifies the global types.h header to define a number of > macros used for the formatted output of fixed-length integers like > grub_uint64_t. Currently we use the traditional "%llu" format > specifiers, adding casts as required t

Re: [PATCH] Fix chainloding + Chainloading into logical partitions

2009-07-22 Thread Pavel Roskin
On Thu, 2009-07-23 at 00:18 +0200, Vladimir 'phcoder' Serbinenko wrote: > There is strictly no need to do this restructuration. The real bug is > different fix would be setting dev->disk->partition to 0 before > calling grub_disk_read and restoring it afterwards. This part of code > is changed any

Re: [PATCH] Fix chainloding + Chainloading into logical partitions

2009-07-22 Thread Vladimir 'phcoder' Serbinenko
On Thu, Jul 23, 2009 at 12:11 AM, Jean-Pierre Flori wrote: > As already mentioned in this mailing list > (http://lists.gnu.org/archive/html/grub-devel/2008-07/msg00192.html)n I > can't chainload Syslinux from Grub2 on a disk with a pc partition table > (Syslinux is installed on a primary partition)

Re: [PATCH] Fix chainloding + Chainloading into logical partitions

2009-07-22 Thread Jean-Pierre Flori
As already mentioned in this mailing list ( http://lists.gnu.org/archive/html/grub-devel/2008-07/msg00192.html)nI can't chainload Syslinux from Grub2 on a disk with a pc partition table (Syslinux is installed on a primary parti

[RFC,PATCH] C99 format specifiers for fixed-length integer types

2009-07-22 Thread Javier Martín
This patch modifies the global types.h header to define a number of macros used for the formatted output of fixed-length integers like grub_uint64_t. Currently we use the traditional "%llu" format specifiers, adding casts as required to assuage the loud GCC. However, casts to shut the compiler up

Re: [PATCH] Bug fix for LVM

2009-07-22 Thread Bean
On Thu, Jul 23, 2009 at 1:33 AM, Robert Millan wrote: > On Sun, Jul 19, 2009 at 05:41:04PM +0800, Bean wrote: >> +      if (is_raid) >> +     printf ("raid mdraid"); >> + >> +      if (is_lvm) >> +     printf ((is_raid) ? " lvm" : "lvm"); > > Is there a better way to handle this?  Perhaps we could

Re: grub-0.97/btrfs: the files fsys_btrfs.c, btrfs.h

2009-07-22 Thread Edward Shishkin
Vladimir 'phcoder' Serbinenko wrote: On Wed, Jul 22, 2009 at 7:04 PM, Felix Zielcke wrote: Am Mittwoch, den 22.07.2009, 18:41 +0200 schrieb Edward Shishkin: Hi Edward, Hello. (CC linux-btrfs mailing list) Uhm there is no CC? I'm unsure now if I should CC it or not. Ed

Re: [PATCH] Call a module's init function only after the module is successfully added

2009-07-22 Thread Pavel Roskin
On Wed, 2009-07-22 at 19:36 +0200, Robert Millan wrote: > On Tue, Jul 21, 2009 at 04:02:48PM -0400, Pavel Roskin wrote: > > > > By the way, kern/dl.c have some unused functions (grub_dl_unload_all). > > grub_machine_fini() used to rely on this, but at some point we concluded it > wasn't useful to

Re: sparc: [Fwd: Bug#538030: grub-ieee1275 fails to install bootblock]

2009-07-22 Thread David Miller
From: Felix Zielcke Date: Wed, 22 Jul 2009 20:11:44 +0200 > Just mail him: Alexander Vlasov > but then please also CC the bug report: 538...@bugs.debian.org > You could ask then also if he wants to subscribe to grub-devel but if > not then please CC him + the bug report for everything which is >

Re: sparc: [Fwd: Bug#538030: grub-ieee1275 fails to install bootblock]

2009-07-22 Thread Felix Zielcke
Am Mittwoch, den 22.07.2009, 11:05 -0700 schrieb David Miller: > From: Robert Millan > Date: Wed, 22 Jul 2009 19:57:49 +0200 > > > On Wed, Jul 22, 2009 at 05:45:41PM +0200, Felix Zielcke wrote: > >> > grub-mkdevicemap: error: Cannot open SAS PHY ID > >> > '/sys/devices/root/f0063e50/pci:02/0

Re: sparc: [Fwd: Bug#538030: grub-ieee1275 fails to install bootblock]

2009-07-22 Thread David Miller
From: Robert Millan Date: Wed, 22 Jul 2009 19:57:49 +0200 > On Wed, Jul 22, 2009 at 05:45:41PM +0200, Felix Zielcke wrote: >> > grub-mkdevicemap: error: Cannot open SAS PHY ID >> > '/sys/devices/root/f0063e50/pci:02/:02:00.0/:03:09.0/:0a:00.0/:0b:01.0/host0/port-0:0/end_devic

Re: [PATCH] Clear out gfxterm's virtual text_buffer - fixes junk at end of lines

2009-07-22 Thread Robert Millan
On Wed, Jul 22, 2009 at 10:42:54AM -0700, Joe Auricchio wrote: > > On 22 Jul, 2009, at 10:27 , Robert Millan wrote: > >> On Sat, Jul 18, 2009 at 03:39:00PM -0700, Joe Auricchio wrote: >>> >>> On 18 Jul, 2009, at 11:58 , Robert Millan wrote: On Sat, Jul 18, 2009 at 12:15:04AM -0700, Joe Auricch

Re: [PATCH] UUID support for UFS

2009-07-22 Thread Javier Martín
El mié, 22-07-2009 a las 19:47 +0200, Robert Millan escribió: > On Tue, Jul 21, 2009 at 11:34:42PM +0200, Javier Martín wrote: > >> If int and int32_t are different types, gcc will warn about it, at least > >> for implicit conversion with data loss. > > Oh, yes... with the current build system and

Re: [PATCH] Support FreeBSD in osdetect.lua

2009-07-22 Thread Vladimir 'phcoder' Serbinenko
> Well, this gets a bit more complicated.  grub-extras is not part of GNU GRUB, > but osdetect.lua is (currently).  I'm not sure if we should make GRUB > components depend on grub-extras this way (I think this is Pavel's point). Well this part is just inactive if zfs.mod isn't present > > I think w

Re: [PATCH] UUID support for UFS

2009-07-22 Thread Pavel Roskin
On Wed, 2009-07-22 at 19:40 +0200, Robert Millan wrote: > On Tue, Jul 21, 2009 at 03:03:34PM +0200, Vladimir 'phcoder' Serbinenko wrote: > > + grub_uint32_t uuidhi; > > + grub_uint32_t uuidlow; > > [...] > > + grub_sprintf (*uuid, "%08lx%08lx", > > + (unsigned long) grub_le_to_

[RFC] Replace genmk.rb with GNU make construction

2009-07-22 Thread Vladimir 'phcoder' Serbinenko
Hello. genmk.rb is a point where our build system has the most problems. For once ruby is a problematic dependency on some platforms. Then few people here understand ruby enough. And thirdly genmk.rb prevents splitting *_SOURCES across .rmk. So I propose to switch to GNU make which is already our d

Re: sparc: [Fwd: Bug#538030: grub-ieee1275 fails to install bootblock]

2009-07-22 Thread Robert Millan
On Wed, Jul 22, 2009 at 05:45:41PM +0200, Felix Zielcke wrote: > Hi David, > > could you please have a look at this? > It's a sparc problem. > > Weitergeleitete Nachricht > > Von: Alexander Vlasov > > Reply-to: Alexander Vlasov , > > 538...@bugs.debian.org > > An: sub...@bugs.d

Re: Grub2 problem?

2009-07-22 Thread Robert Millan
On Tue, Jul 21, 2009 at 04:42:33PM +0200, Felix Zielcke wrote: > > The picture clearly shows that he has now to use --force option if he > really wants blocklists. I wonder why did that person get this error. The message quoted below suggests this is a GPT, but the error message says MSDOS-style

Re: [PATCH] Support FreeBSD in osdetect.lua

2009-07-22 Thread Robert Millan
On Tue, Jul 21, 2009 at 11:50:12PM +0200, Vladimir 'phcoder' Serbinenko wrote: > > > > Obviously, the zfs part shouldn't go in yet. > > > We discussed with Robert Millan the issue and decided that zfs.mod > will go to grub-extras. Just I had no time to upload it yet. As zfs > part of osdetect.lua i

Re: [PATCH] UUID support for UFS

2009-07-22 Thread Vladimir 'phcoder' Serbinenko
On Wed, Jul 22, 2009 at 7:40 PM, Robert Millan wrote: > On Tue, Jul 21, 2009 at 03:03:34PM +0200, Vladimir 'phcoder' Serbinenko wrote: >> +  grub_uint32_t uuidhi; >> +  grub_uint32_t uuidlow; >> [...] >> +      grub_sprintf (*uuid, "%08lx%08lx", >> +                 (unsigned long) grub_le_to_cpu32

Re: [PATCH] UUID support for UFS

2009-07-22 Thread Robert Millan
On Tue, Jul 21, 2009 at 11:34:42PM +0200, Javier Martín wrote: >> If int and int32_t are different types, gcc will warn about it, at least >> for implicit conversion with data loss. > Oh, yes... with the current build system and without -Werror, warnings > are _very_ visible. Javier, I think I

Re: [PATCH] Fix when installing on pationless but partionable medium

2009-07-22 Thread Pavel Roskin
On Wed, 2009-07-22 at 19:43 +0200, Vladimir 'phcoder' Serbinenko wrote: > On Wed, Jul 22, 2009 at 7:36 PM, Pavel Roskin wrote: > > On Wed, 2009-07-22 at 19:16 +0200, Robert Millan wrote: > > boot.img has holes for FAT and PC MBR. That's two configurations we > > support. No other partition tables

Re: [PATCH] Fix when installing on pationless but partionable medium

2009-07-22 Thread Pavel Roskin
On Wed, 2009-07-22 at 19:22 +0200, Robert Millan wrote: > On Sat, Jul 18, 2009 at 11:28:58PM +0200, Vladimir 'phcoder' Serbinenko wrote: > > > I don't understand what you mean here. > > Let's take a common example of cdrom. Most of the users and developers > > are accustomed to a cdrom holding one

Re: [PATCH] UUID support for UFS

2009-07-22 Thread Robert Millan
On Tue, Jul 21, 2009 at 11:45:59PM +0200, Vladimir 'phcoder' Serbinenko wrote: > This change would allow to produce a code which is cleaner, easier to > read and understand. However I'm opposed to modifying printf function > for it. Instead we could just define somewhere: > GRUB_PRIx32 "%x" > #ifde

Re: [PATCH] Fix when installing on pationless but partionable medium

2009-07-22 Thread Vladimir 'phcoder' Serbinenko
On Wed, Jul 22, 2009 at 7:36 PM, Pavel Roskin wrote: > On Wed, 2009-07-22 at 19:16 +0200, Robert Millan wrote: > boot.img has holes for FAT and PC MBR.  That's two configurations we > support.  No other partition tables or filesystems are supported. Many filesystems leave first block free. These ar

Re: [PATCH] Clear out gfxterm's virtual text_buffer - fixes junk at end of lines

2009-07-22 Thread Joe Auricchio
On 22 Jul, 2009, at 10:27 , Robert Millan wrote: On Sat, Jul 18, 2009 at 03:39:00PM -0700, Joe Auricchio wrote: On 18 Jul, 2009, at 11:58 , Robert Millan wrote: On Sat, Jul 18, 2009 at 12:15:04AM -0700, Joe Auricchio wrote: This fixes a 100% reproducible and very annoying bug I've found: S

Re: [PATCH] UUID support for UFS

2009-07-22 Thread Robert Millan
On Tue, Jul 21, 2009 at 03:03:34PM +0200, Vladimir 'phcoder' Serbinenko wrote: > + grub_uint32_t uuidhi; > + grub_uint32_t uuidlow; > [...] > + grub_sprintf (*uuid, "%08lx%08lx", > + (unsigned long) grub_le_to_cpu32 (data->sblock.uuidhi), > + (unsigned long) g

Re: [PATCH] Fix when installing on pationless but partionable medium

2009-07-22 Thread Pavel Roskin
On Wed, 2009-07-22 at 19:16 +0200, Robert Millan wrote: > As a bootloader, most of the decisions GRUB takes have a critical effect. We > can't make GRUB take those decisions based on heuristic. Agreed. Sorry for being late in joining this discussion. It's not enough to make sure that there is s

Re: [PATCH] Call a module's init function only after the module is successfully added

2009-07-22 Thread Robert Millan
On Tue, Jul 21, 2009 at 04:02:48PM -0400, Pavel Roskin wrote: > > By the way, kern/dl.c have some unused functions (grub_dl_unload_all). grub_machine_fini() used to rely on this, but at some point we concluded it wasn't useful to change machine state when loading an OS, other than things specific

Re: [PATCH] Bug fix for LVM

2009-07-22 Thread Robert Millan
On Sun, Jul 19, 2009 at 05:41:04PM +0800, Bean wrote: > + if (is_raid) > + printf ("raid mdraid"); > + > + if (is_lvm) > + printf ((is_raid) ? " lvm" : "lvm"); Is there a better way to handle this? Perhaps we could make the list newline separated instead of space separated and a

Re: [PATCH] Bug fix for LVM

2009-07-22 Thread Robert Millan
On Sun, Jul 19, 2009 at 05:41:04PM +0800, Bean wrote: > > Hi, > > I've come up an alternative solution to grub_raid_rescan, we can use > the same trick as lvm, call fini and then init function, this would > have the same effect of rescanning. Now that grub_raid_rescan is gone, > I can simply raid

Re: [PATCH] Clear out gfxterm's virtual text_buffer - fixes junk at end of lines

2009-07-22 Thread Robert Millan
On Sat, Jul 18, 2009 at 03:39:00PM -0700, Joe Auricchio wrote: > > On 18 Jul, 2009, at 11:58 , Robert Millan wrote: >> On Sat, Jul 18, 2009 at 12:15:04AM -0700, Joe Auricchio wrote: >>> >>> This fixes a 100% reproducible and very annoying bug I've found: >>> Switch >>> to gfxterm and until your c

Re: [PATCH] Fix when installing on pationless but partionable medium

2009-07-22 Thread Robert Millan
On Sun, Jul 19, 2009 at 11:02:05AM +0100, Colin Watson wrote: > On Sat, Jul 18, 2009 at 09:22:11PM +0200, Robert Millan wrote: > > On Sat, Jul 18, 2009 at 09:00:36PM +0200, Vladimir 'phcoder' Serbinenko > > wrote: > > > On Sat, Jul 18, 2009 at 8:42 PM, Robert Millan wrote: > > > > I'm not sure the

Re: [PATCH] Fix when installing on pationless but partionable medium

2009-07-22 Thread Robert Millan
On Sat, Jul 18, 2009 at 11:28:58PM +0200, Vladimir 'phcoder' Serbinenko wrote: > > I don't understand what you mean here. > Let's take a common example of cdrom. Most of the users and developers > are accustomed to a cdrom holding one filesystem. On macs however cds > are partitioned and not being

Re: [PATCH] Fix when installing on pationless but partionable medium

2009-07-22 Thread Robert Millan
On Sun, Jul 19, 2009 at 11:07:41AM +0100, Colin Watson wrote: > On Sat, Jul 18, 2009 at 09:17:41PM +0200, Robert Millan wrote: > > On Sat, Jul 18, 2009 at 09:01:38PM +0200, Vladimir 'phcoder' Serbinenko > > wrote: > > > On Sat, Jul 18, 2009 at 8:45 PM, Robert Millan wrote: > > > > I might be missi

Re: grub-0.97/btrfs: the files fsys_btrfs.c, btrfs.h

2009-07-22 Thread Vladimir 'phcoder' Serbinenko
On Wed, Jul 22, 2009 at 7:04 PM, Felix Zielcke wrote: > Am Mittwoch, den 22.07.2009, 18:41 +0200 schrieb Edward Shishkin: > > Hi Edward, > >> (CC linux-btrfs mailing list) > > Uhm there is no CC? > I'm unsure now if I should CC it or not. Edward had a problem sending to our list because grub-devel

Re: grub-0.97/VFS

2009-07-22 Thread Vladimir 'phcoder' Serbinenko
On Wed, Jul 22, 2009 at 6:41 PM, Edward Shishkin wrote: > (CC linux-btrfs mailing list) > > Hello everyone. > > Grub-0.97 filesystem interface (read_func, dir_func) > seems to be poor. Instead of this I would prefer to > have something like the following: > Could you have a look at fs/fshelp.c? It'

Re: grub-0.97/btrfs: the files fsys_btrfs.c, btrfs.h

2009-07-22 Thread Felix Zielcke
Am Mittwoch, den 22.07.2009, 18:41 +0200 schrieb Edward Shishkin: Hi Edward, > (CC linux-btrfs mailing list) Uhm there is no CC? I'm unsure now if I should CC it or not. Anyway, nice to see that you work on btrfs for grub. But grub-legacy is totally dead now, it would be better if you would put

Re: [PATCH] enable buildable targets by default

2009-07-22 Thread Robert Millan
On Sat, Jul 18, 2009 at 06:54:49PM -0400, Pavel Roskin wrote: > On Sat, 2009-07-18 at 23:38 +0200, Vladimir 'phcoder' Serbinenko wrote: > > > > I fully agree. The idea with my proposal (we talked this on IRC, I think) > > > was to simplify things, so I proposed that we enable everything so we >

Re: [PATCH] Build system improvement

2009-07-22 Thread Robert Millan
On Wed, Jul 22, 2009 at 12:14:54PM -0400, Pavel Roskin wrote: > On Wed, 2009-07-22 at 14:41 +0200, Felix Zielcke wrote: > > > > [0] http://lists.gnu.org/archive/html/grub-devel/2009-05/msg9.html > > > > So what's now with it? > > Marco can you at least say something about it? > > It would be

grub-0.97/VFS

2009-07-22 Thread Edward Shishkin
(CC linux-btrfs mailing list) Hello everyone. Grub-0.97 filesystem interface (read_func, dir_func) seems to be poor. Instead of this I would prefer to have something like the following: /* * * .init_root() // set index of root dir * .lookup_begin()// get index by name * .looku

Re: [PATCH] Build system improvement

2009-07-22 Thread Pavel Roskin
On Wed, 2009-07-22 at 14:41 +0200, Felix Zielcke wrote: > > [0] http://lists.gnu.org/archive/html/grub-devel/2009-05/msg9.html > > So what's now with it? > Marco can you at least say something about it? > It would be very nice if the warnings would be more visible by default. > Probable we ca

Re: sparc: [Fwd: Bug#538030: grub-ieee1275 fails to install bootblock]

2009-07-22 Thread David Miller
From: Felix Zielcke Date: Wed, 22 Jul 2009 17:45:41 +0200 > could you please have a look at this? > It's a sparc problem. I won't even be close to being able to look into this until late August as I'm currently in New York City and therefore thousands of miles from my Sparc systems :-) ___

sparc: [Fwd: Bug#538030: grub-ieee1275 fails to install bootblock]

2009-07-22 Thread Felix Zielcke
Hi David, could you please have a look at this? It's a sparc problem. Weitergeleitete Nachricht > Von: Alexander Vlasov > Reply-to: Alexander Vlasov , > 538...@bugs.debian.org > An: sub...@bugs.debian.org > Betreff: Bug#538030: grub-ieee1275 fails to install bootblock > Datum:

Re: [PATCH] New object format

2009-07-22 Thread Bean
Hi, >> Oh, thanks for the note. In fact, we can use  GRUB_CPU_SIZEOF_LONG, >> its value is GRUB_TARGET_SIZEOF_LONG when building target, and >> SIZEOF_LONG when building utilities. > Wonderful idea. I'm researching this for a possible implementation of a > GRUB equivalent to the C99 fixed-length i

Re: [PATCH] New object format

2009-07-22 Thread Javier Martín
El mié, 22-07-2009 a las 21:34 +0800, Bean escribió: > 2009/7/22 Javier Martín : > > El mié, 22-07-2009 a las 19:12 +0800, Bean escribió: > >> Fix some wrong assumption in types.h and efi header files. For > >> example, grub_efi_uint_t is defined as unsigned long, but it should be > >> grub_uint64_

Re: [PATCH] New object format

2009-07-22 Thread Bean
2009/7/22 Javier Martín : > El mié, 22-07-2009 a las 19:12 +0800, Bean escribió: >> Fix some wrong assumption in types.h and efi header files. For >> example, grub_efi_uint_t is defined as unsigned long, but it should be >> grub_uint64_t in 64-bit EFI, this problem won't show previously as >> unsig

Re: [PATCH] Build system improvement

2009-07-22 Thread Felix Zielcke
Am Sonntag, den 03.05.2009, 10:29 +0200 schrieb Felix Zielcke: > Am Samstag, den 11.04.2009, 19:09 +0900 schrieb Yoshinori K. Okuji: > > On Saturday 11 April 2009 08:25:50 phcoder wrote: > > > I don't see any stoppers to merge this patch > > > > Personally, I don't like this so much. Is it so usef

Re: [PATCH] New object format

2009-07-22 Thread Javier Martín
El mié, 22-07-2009 a las 19:12 +0800, Bean escribió: > Fix some wrong assumption in types.h and efi header files. For > example, grub_efi_uint_t is defined as unsigned long, but it should be > grub_uint64_t in 64-bit EFI, this problem won't show previously as > unsigned long is 64-bit in elf64 gcc,

Re: [PATCH] New object format

2009-07-22 Thread Bean
Update: Now fully support mingw-w64, the configure line is this: ./configure --with-platform=efi --target=x86_64-w64-mingw32 Compile ok in both XP64 and linux with mingw-w64 cross compiler, the generated grub.efi tested all right on macbook. Fix some wrong assumption in types.h and efi header f

Re: grub-mkconfig fails on every non i386-pc because of gfxterm/vbe

2009-07-22 Thread Felix Zielcke
Am Donnerstag, den 11.06.2009, 18:09 +0200 schrieb Vladimir 'phcoder' Serbinenko: > On Thu, Jun 4, 2009 at 12:11 AM, Felix Zielcke wrote: > > Am Mittwoch, den 03.06.2009, 16:55 -0400 schrieb Pavel Roskin: > >> On Wed, 2009-06-03 at 11:43 +0200, Felix Zielcke wrote: > >> > I wonder why nobody on thi