grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] File access library for lua


From: Bean
Subject: Re: [PATCH] File access library for lua
Date: Tue, 23 Jun 2009 02:49:07 +0800

On Tue, Jun 23, 2009 at 2:31 AM, Pavel Roskin<address@hidden> wrote:
> On Tue, 2009-06-23 at 01:37 +0800, Bean wrote:
>> Hi,
>>
>> Update for this patch:
>>
>> 1, enum_device now pass fs and uuid as well
>> 2, enum_file change parameter order, now the callback function is the
>> first, path is the second
>> 3, add parameter checking for library function
>> 4, add three function
>>
>> file_eof - test if eof is encounter for a file
>> file_exist - test if a file exists
>> add_menu - add menu item
>
> The new patch introduces a warning:
>
> script/lua/grub_lib.c: In function 'grub_lua_add_menu':
> script/lua/grub_lib.c:394: warning: pointer targets in passing argument
> 3 of 'luaL_checklstring' differ in signedness
> script/lua/lauxlib.h:51: note: expected 'size_t *' but argument is of
> type 'int *'
>
> Fix:
>
> diff --git a/script/lua/grub_lib.c b/script/lua/grub_lib.c
> index 8561dd0..bcff3db 100644
> --- a/script/lua/grub_lib.c
> +++ b/script/lua/grub_lib.c
> @@ -388,7 +388,8 @@ grub_lua_file_exist (lua_State *state)
>  static int
>  grub_lua_add_menu (lua_State *state)
>  {
> -  int len, n;
> +  int n;
> +  size_t len;
>   const char *source;
>
>   source = luaL_checklstring (state, 1, &len);
>
>> I also add a script osdetect.lua which can detect Windows
>> 2K/NT/XP/Vista and linux at runtime, to use it, add this in grub.cfg:
>>
>> source osdetect.lua
>
> It didn't find Linux for me, but it found the "Other OS", which is
> actually FreeDOS.

What's the name of kernel and initrd.img ?

>
> --
> Regards,
> Pavel Roskin
>
>
> _______________________________________________
> Grub-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/grub-devel
>



-- 
Bean




reply via email to

[Prev in Thread] Current Thread [Next in Thread]