All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] File access library for lua
Date: Mon, 22 Jun 2009 14:31:40 -0400	[thread overview]
Message-ID: <1245695500.1926.10.camel@mj> (raw)
In-Reply-To: <ca0f59980906221037i7d8af6ma17e27683d6c3488@mail.gmail.com>

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.

-- 
Regards,
Pavel Roskin



  reply	other threads:[~2009-06-22 18:31 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-21 11:33 [PATCH] File access library for lua Bean
2009-06-22  0:42 ` Pavel Roskin
2009-06-22  3:38   ` Bean
2009-06-22  3:45     ` Pavel Roskin
2009-06-22  9:44     ` Robert Millan
2009-06-22 10:26       ` Bean
2009-06-22 10:59         ` Robert Millan
2009-06-22 17:37           ` Bean
2009-06-22 18:31             ` Pavel Roskin [this message]
2009-06-22 18:49               ` Bean
2009-06-22 18:59                 ` Pavel Roskin
2009-06-22 19:15                   ` Bean
2009-06-22 19:28                     ` Pavel Roskin
2009-06-22 19:50                       ` Bean
2009-06-22 20:06                         ` Pavel Roskin
2009-06-23  9:27                           ` Bean
2009-06-23 22:10                             ` Pavel Roskin
2009-06-23 22:50                               ` Robert Millan
2009-06-26 23:25                                 ` Pavel Roskin
2009-06-24  4:41                               ` Bean
2009-06-24  5:58                                 ` Bean
2009-06-27  0:22                                 ` Pavel Roskin
2009-06-27  3:53                                   ` Bean
2009-06-27  4:04                                     ` Pavel Roskin
2009-06-27  4:14                                       ` Bean
2009-07-05  9:59                                         ` Bean
2009-07-05 13:11                                           ` Duboucher Thomas
2009-07-05 14:28                                             ` Bean
2009-06-25 22:39                           ` Vladimir 'phcoder' Serbinenko
2009-06-26 23:45                             ` Pavel Roskin
2009-07-31  8:07             ` Marco Gerards

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=1245695500.1926.10.camel@mj \
    --to=proski@gnu.org \
    --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.