fix changelog and doc
This commit is contained in:
parent
5b08062083
commit
7955bea0d8
4 changed files with 9 additions and 14 deletions
|
@ -6,12 +6,9 @@
|
||||||
* grub-core/commands/menuentry.c (setparams_prefix): Use single
|
* grub-core/commands/menuentry.c (setparams_prefix): Use single
|
||||||
quotes for arguments.
|
quotes for arguments.
|
||||||
* grub-core/lib/legacy_parse.c (grub_legacy_escape): Use
|
* grub-core/lib/legacy_parse.c (grub_legacy_escape): Use
|
||||||
grub_script_escape_squotes function instead.
|
grub_strchrsub function instead.
|
||||||
|
|
||||||
* include/grub/script_sh.h (grub_script_escape_squotes): New
|
* include/grub/misc.h (grub_strchrsub): New function.
|
||||||
prototype.
|
|
||||||
* grub-core/script/script.c (grub_script_escape_squotes): New
|
|
||||||
function.
|
|
||||||
|
|
||||||
2010-11-18 Vladimir Serbinenko <phcoder@gmail.com>
|
2010-11-18 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
#include <grub/extcmd.h>
|
#include <grub/extcmd.h>
|
||||||
#include <grub/i18n.h>
|
#include <grub/i18n.h>
|
||||||
#include <grub/normal.h>
|
#include <grub/normal.h>
|
||||||
#include <grub/script_sh.h>
|
|
||||||
|
|
||||||
static const struct grub_arg_option options[] =
|
static const struct grub_arg_option options[] =
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
#include <grub/misc.h>
|
#include <grub/misc.h>
|
||||||
#include <grub/mm.h>
|
#include <grub/mm.h>
|
||||||
#include <grub/err.h>
|
#include <grub/err.h>
|
||||||
#include <grub/script_sh.h>
|
|
||||||
#include <grub/legacy_parse.h>
|
#include <grub/legacy_parse.h>
|
||||||
#include <grub/i386/pc/vesa_modes_table.h>
|
#include <grub/i386/pc/vesa_modes_table.h>
|
||||||
|
|
||||||
|
@ -323,24 +322,24 @@ struct legacy_command legacy_commands[] =
|
||||||
char *
|
char *
|
||||||
grub_legacy_escape (const char *in, grub_size_t len)
|
grub_legacy_escape (const char *in, grub_size_t len)
|
||||||
{
|
{
|
||||||
char saved;
|
|
||||||
char *ptr;
|
char *ptr;
|
||||||
char *outptr;
|
char saved;
|
||||||
|
char *ret;
|
||||||
int overhead = 0;
|
int overhead = 0;
|
||||||
|
|
||||||
for (ptr = (char*)in; ptr < in + len && *ptr; ptr++)
|
for (ptr = (char*)in; ptr < in + len && *ptr; ptr++)
|
||||||
if (*ptr == '\'')
|
if (*ptr == '\'')
|
||||||
overhead += 3;
|
overhead += 3;
|
||||||
outptr = grub_malloc (ptr - in + overhead + 1);
|
ret = grub_malloc (ptr - in + overhead + 1);
|
||||||
if (!outptr)
|
if (!ret)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
ptr = (char*)in;
|
ptr = (char*)in;
|
||||||
saved = ptr[len];
|
saved = ptr[len];
|
||||||
ptr[len] = '\0';
|
ptr[len] = '\0';
|
||||||
grub_strchrsub (outptr, in, '\'', "'\\''");
|
grub_strchrsub (ret, ptr, '\'', "'\\''");
|
||||||
ptr[len] = saved;
|
ptr[len] = saved;
|
||||||
return outptr;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
|
|
|
@ -194,7 +194,7 @@ grub_strncasecmp (const char *s1, const char *s2, grub_size_t n)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Replace all `ch' characters of `input' with `with' and copy the
|
/* Replace all `ch' characters of `input' with `with' and copy the
|
||||||
result into `output'; return address of the end in `output'. */
|
result into `output'; return EOS address of `output'. */
|
||||||
static inline char *
|
static inline char *
|
||||||
grub_strchrsub (char *output, const char *input, char ch, const char *with)
|
grub_strchrsub (char *output, const char *input, char ch, const char *with)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue