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

2009-07-23 Thread Vladimir 'phcoder' Serbinenko
On Thu, Jul 23, 2009 at 2:04 AM, Pavel Roskin wrote: > 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

Re: [PATCH 3/4] Change grub_file_seek() to return grub_err_t

2009-07-23 Thread Vladimir 'phcoder' Serbinenko
On Wed, Jul 22, 2009 at 5:16 AM, Pavel Roskin wrote: > No callers need the previous offset.  Returning -1 with implicit cast to > grub_off_t required a cast just to check for errors.  This also makes > grub_file_seek() more similar to fseek(). > > ChangeLog: > >        * kern/file.c (grub_file_seek

Re: [PATCH 2/3] Eliminate grub_dl_call_init()

2009-07-23 Thread Vladimir 'phcoder' Serbinenko
On Wed, Jul 22, 2009 at 2:47 AM, Pavel Roskin wrote: > It's just two lines long and there is only one caller.  Besides, there > is no equivalent for mod->fini. This patch is fine for me > > ChangeLog: > >        * kern/dl.c (grub_dl_call_init): Remove. >        (grub_dl_load_core): Call mod->init d

Re: [PATCH 1/3] Don't initialize module before grub_dl_add() succeeds

2009-07-23 Thread Vladimir 'phcoder' Serbinenko
On Wed, Jul 22, 2009 at 2:47 AM, Pavel Roskin wrote: > ChangeLog: > >        * kern/dl.c (grub_dl_load_core): Call grub_dl_call_init() only >        after grub_dl_add() succeeds.  Set mod->ref_count to 1 later to >        allow grub_dl_unload() to work. >        Original patch by Joe Auricchio Ok

[BUGFIX] Fix cut menuentry on failed boot

2009-07-23 Thread Vladimir 'phcoder' Serbinenko
Hello. If syntax error in menu entry occurs it oftens results in the menu cut after first line. Here is the fix -- Regards Vladimir 'phcoder' Serbinenko Personal git repository: http://repo.or.cz/w/grub2/phcoder.git diff --git a/ChangeLog b/ChangeLog index a0780ab..8824f1c 100644 --- a/ChangeLog

[BUGFIX] Don't use DT_DIR: It doesn't work on non-ext* filesystems

2009-07-23 Thread Vladimir 'phcoder' Serbinenko
-- Regards Vladimir 'phcoder' Serbinenko Personal git repository: http://repo.or.cz/w/grub2/phcoder.git diff --git a/ChangeLog b/ChangeLog index a0780ab..16aab92 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-07-23 Vladimir Serbinenko + + * util/hostfs.c (grub_hostfs_dir):

[PATCH] zero-fill entry before asking BIOS for memory map

2009-07-23 Thread Vladimir 'phcoder' Serbinenko
Hello. According to xen some BIOSes update only lower 32-bit in mmap entries. To workaround this and not get high values in memory map zero-fill before calling BIOS -- Regards Vladimir 'phcoder' Serbinenko Personal git repository: http://repo.or.cz/w/grub2/phcoder.git diff --git a/ChangeLog b/Ch

[PATCH 2/2] SDL support

2009-07-23 Thread Vladimir 'phcoder' Serbinenko
Hello. Here is already-discussed SDL support -- Regards Vladimir 'phcoder' Serbinenko Personal git repository: http://repo.or.cz/w/grub2/phcoder.git diff --git a/Makefile.in b/Makefile.in index 25acce7..b9b9cda 100644 --- a/Makefile.in +++ b/Makefile.in @@ -95,12 +95,14 @@ endif AWK = @AWK@ LI

Fwd: [PATCH 1/2] Framebuffer split

2009-07-23 Thread Vladimir 'phcoder' Serbinenko
Hello. Here is a framebuffer split which has already been discussed. This patch contains some code by Collin D Bennett in addition to my code. Sorry for compression but maillist server doesn't accept it otherwise -- Regards Vladimir 'phcoder' Serbinenko Personal git repository: http://repo.or.cz/

[PATCH] Check for the appropriate condition in types.h

2009-07-23 Thread Javier Martín
Currently verifies that sizeof(void*)==sizeof(long) and then proceeds to define most fixed-length types based on sizeof(void*). While simplification seems a good idea on paper, it is always good practice to check specifically for what we want to know. In particular, the assumption that long can ho

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

2009-07-23 Thread Jean-Pierre Flori
>On Thu, Jul 23, 2009 at 2:04 AM, Pavel Roskin wrote: >> 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_rea

Re: [PATCH] Check for the appropriate condition in types.h

2009-07-23 Thread Pavel Roskin
On Thu, 2009-07-23 at 13:10 +0200, Javier Martín wrote: > Currently verifies that sizeof(void*)==sizeof(long) and > then proceeds to define most fixed-length types based on sizeof(void*). > While simplification seems a good idea on paper, it is always good > practice to check specifically for what

sparc [Fwd: Bug#538030: grub-install]

2009-07-23 Thread Felix Zielcke
Maybe it helps you David: Weitergeleitete Nachricht > Von: Alexander Vlasov > Reply-to: Alexander Vlasov , > 538...@bugs.debian.org > An: 538...@bugs.debian.org > Betreff: Bug#538030: grub-install > Datum: Thu, 23 Jul 2009 13:39:16 +0200 > > sh -x run of grub-setup reveals invo

Re: [PATCH] Check for the appropriate condition in types.h

2009-07-23 Thread Javier Martín
El jue, 23-07-2009 a las 10:37 -0400, Pavel Roskin escribió: > On Thu, 2009-07-23 at 13:10 +0200, Javier Martín wrote: > > Currently verifies that sizeof(void*)==sizeof(long) and > > then proceeds to define most fixed-length types based on sizeof(void*). > > While simplification seems a good idea

Re: [PATCH] Check for the appropriate condition in types.h

2009-07-23 Thread Vladimir 'phcoder' Serbinenko
> Thanks. I have though of an additional change: if it seems acceptable, > apply the "new" version of the patch that I attach with this message. If > it is not, just use the old version in the original post and I'll send > the new change as another patch. > > The additional change is the refactorin

Re: [PATCH] Check for the appropriate condition in types.h

2009-07-23 Thread Javier Martín
El jue, 23-07-2009 a las 17:40 +0200, Vladimir 'phcoder' Serbinenko escribió: > Actualy I should have used ALIGN_UP here It's just a random sample of code, brought up by a search for (long). I'm pretty sure more examples abound. > > Regarding the ChangeLog entry, I always have problems with them.

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

2009-07-23 Thread Javier Martín
Here is a new version which also incorporates the C99 integer constant macros. To avoid excess verbosity, all macros have now names like Gx, where x is the standard name. Thus, PRIx64, UINT64_C(a) --> GPRIx64, GUINT64_C(a). If the changes seem too invasive and/or the verbosity added is unbearable,

Re: [PATCH 3/4] Change grub_file_seek() to return grub_err_t

2009-07-23 Thread Pavel Roskin
On Thu, 2009-07-23 at 10:23 +0200, Vladimir 'phcoder' Serbinenko wrote: > On Wed, Jul 22, 2009 at 5:16 AM, Pavel Roskin wrote: > > No callers need the previous offset. Returning -1 with implicit cast to > > grub_off_t required a cast just to check for errors. This also makes > > grub_file_seek()

[PATCH] lua: change grub.file_seek() to return error code, not the old offset

2009-07-23 Thread Pavel Roskin
This makes it easier to check if the call has succeeded. The old offset is rarely needed. ChangeLog: * script/lua/grub_lib.c (grub_lua_file_seek): Return error code, not the old offset. --- script/lua/grub_lib.c |7 ++- 1 files changed, 2 insertions(+), 5 deletions(-) d

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

2009-07-23 Thread Vladimir 'phcoder' Serbinenko
2009/7/23 Javier Martín : > Here is a new version which also incorporates the C99 integer constant > macros. To avoid excess verbosity, all macros have now names like Gx, > where x is the standard name. Thus, PRIx64, UINT64_C(a) --> GPRIx64, > GUINT64_C(a). Please respect current convention of usin

Re: [PATCH] Check for the appropriate condition in types.h

2009-07-23 Thread Pavel Roskin
On Thu, 2009-07-23 at 20:11 +0200, Javier Martín wrote: > El jue, 23-07-2009 a las 17:40 +0200, Vladimir 'phcoder' Serbinenko > escribió: > > Actualy I should have used ALIGN_UP here > It's just a random sample of code, brought up by a search for (long). > I'm pretty sure more examples abound. > >

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

2009-07-23 Thread Pavel Roskin
On Thu, 2009-07-23 at 21:51 +0200, Vladimir 'phcoder' Serbinenko wrote: > 2009/7/23 Javier Martín : > > Here is a new version which also incorporates the C99 integer constant > > macros. To avoid excess verbosity, all macros have now names like Gx, > > where x is the standard name. Thus, PRIx64, UI

Re: [PATCH] Check for the appropriate condition in types.h

2009-07-23 Thread Vladimir 'phcoder' Serbinenko
>> > [GRUB_CPU_SIZEOF_VOID_P == 8]: Changed to ... >> > [GRUB_CPU_SIZEOF_LONG == 8]: ... this. >> Ok, let's adopt this form instead. The proposed ChangeLog would now be: > > >From the GNU Coding Standards: > > "C programs often contain compile-time `#if' conditionals.  Many changes > are conditiona

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

2009-07-23 Thread Vladimir 'phcoder' Serbinenko
On Thu, Jul 23, 2009 at 10:16 PM, Pavel Roskin wrote: > On Thu, 2009-07-23 at 21:51 +0200, Vladimir 'phcoder' Serbinenko wrote: >> 2009/7/23 Javier Martín : >> > Here is a new version which also incorporates the C99 integer constant >> > macros. To avoid excess verbosity, all macros have now names

Re: [PATCH 2/2] SDL support

2009-07-23 Thread Vladimir 'phcoder' Serbinenko
On Thu, Jul 23, 2009 at 10:32 PM, Pavel Roskin wrote: > On Thu, 2009-07-23 at 11:49 +0200, Vladimir 'phcoder' Serbinenko wrote: >> Hello. Here is already-discussed SDL support > > The patch refers to video/fb/video_fb.c, which is not included. Well it's PATCH 2/2 and PATCH 1/2 is framebuffer split

Re: [PATCH 2/2] SDL support

2009-07-23 Thread Pavel Roskin
On Thu, 2009-07-23 at 11:49 +0200, Vladimir 'phcoder' Serbinenko wrote: > Hello. Here is already-discussed SDL support The patch refers to video/fb/video_fb.c, which is not included. Also, please check the changes I made to your changes to configure.ac. Please check the spelling of "explicitly".

Re: [PATCH] Check for the appropriate condition in types.h

2009-07-23 Thread Pavel Roskin
On Thu, 2009-07-23 at 22:30 +0200, Vladimir 'phcoder' Serbinenko wrote: > >> > [GRUB_CPU_SIZEOF_VOID_P == 8]: Changed to ... > >> > [GRUB_CPU_SIZEOF_LONG == 8]: ... this. > >> Ok, let's adopt this form instead. The proposed ChangeLog would now be: > > > > >From the GNU Coding Standards: > > > > "C

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

2009-07-23 Thread Javier Martín
Well, I'll try to address you both at once... Let me say that seeing more messages arrive with fresh arguments as I tried to build a coherent response was distressing ;) -- Pavel, you are right. I recognize I've gone overboard trying to be the paladin of standards, and thus I'd like to withdraw m

Re: [PATCH] zero-fill entry before asking BIOS for memory map

2009-07-23 Thread Pavel Roskin
On Thu, 2009-07-23 at 11:38 +0200, Vladimir 'phcoder' Serbinenko wrote: > Hello. According to xen some BIOSes update only lower 32-bit in mmap > entries. To workaround this and not get high values in memory map > zero-fill before calling BIOS I think the fix belongs to grub_get_mmap_entry(), not t

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

2009-07-23 Thread Pavel Roskin
On Thu, 2009-07-23 at 23:25 +0200, Javier Martín wrote: > With the reduced version of the patch I'm putting forward, such a > (hypothetical, indeed) change will only impact types.h, while otherwise > many source files will need to be modified in a hunt for "%ll"s and > their variations. We can con

Re: [PATCH] zero-fill entry before asking BIOS for memory map

2009-07-23 Thread Vladimir 'phcoder' Serbinenko
On Thu, Jul 23, 2009 at 11:31 PM, Pavel Roskin wrote: > On Thu, 2009-07-23 at 11:38 +0200, Vladimir 'phcoder' Serbinenko wrote: >> Hello. According to xen some BIOSes update only lower 32-bit in mmap >> entries. To workaround this and not get high values in memory map >> zero-fill before calling BI

Re: [BUGFIX] Don't use DT_DIR: It doesn't work on non-ext* filesystems

2009-07-23 Thread Pavel Roskin
On Thu, 2009-07-23 at 11:29 +0200, Vladimir 'phcoder' Serbinenko wrote: > -#ifdef DT_DIR > - info.dir = (de->d_type == DT_DIR); > -#else >info.dir = !! is_dir (path, de->d_name); > -#endif Fine with me. Finally a patch that reduces the number of preprocessor directives :-) -- Rega

Re: [PATCH 2/2] Alias cls as clear

2009-07-23 Thread Pavel Roskin
On Wed, 2009-07-22 at 22:08 -0700, Joe Auricchio wrote: > * 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 w

Re: Fwd: [PATCH 1/2] Framebuffer split

2009-07-23 Thread Pavel Roskin
On Thu, 2009-07-23 at 11:52 +0200, Vladimir 'phcoder' Serbinenko wrote: > Hello. Here is a framebuffer split which has already been discussed. > This patch contains some code by Collin D Bennett in addition to my > code. Sorry for compression but maillist server doesn't accept it otherwise Please

Re: [PATCH 2/2] Alias cls as clear

2009-07-23 Thread Joe Auricchio
On 23 Jul, 2009, at 15:42 , Pavel Roskin wrote: On Wed, 2009-07-22 at 22:08 -0700, Joe Auricchio wrote: * 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 comman

Re: [PATCH 2/2] SDL support

2009-07-23 Thread Pavel Roskin
On Thu, 2009-07-23 at 22:44 +0200, Vladimir 'phcoder' Serbinenko wrote: > On Thu, Jul 23, 2009 at 10:32 PM, Pavel Roskin wrote: > > On Thu, 2009-07-23 at 11:49 +0200, Vladimir 'phcoder' Serbinenko wrote: > >> Hello. Here is already-discussed SDL support > > > > The patch refers to video/fb/video_fb