|
|
f96e0b |
From 43105af56c8e4304f0cd8ffeafdba81726cfbb3f Mon Sep 17 00:00:00 2001
|
|
|
f96e0b |
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
|
|
|
f96e0b |
Date: Fri, 12 Apr 2013 22:37:59 +0200
|
|
|
f96e0b |
Subject: [PATCH 296/482] Replace stpcpy with grub_stpcpy in tools.
|
|
|
f96e0b |
|
|
|
f96e0b |
---
|
|
|
f96e0b |
ChangeLog | 4 ++++
|
|
|
f96e0b |
util/getroot.c | 4 ++--
|
|
|
f96e0b |
util/grub-fstest.c | 4 ++--
|
|
|
f96e0b |
util/grub-probe.c | 4 ++--
|
|
|
f96e0b |
4 files changed, 10 insertions(+), 6 deletions(-)
|
|
|
f96e0b |
|
|
|
f96e0b |
diff --git a/ChangeLog b/ChangeLog
|
|
|
f96e0b |
index 7054441..f9d5dca 100644
|
|
|
f96e0b |
--- a/ChangeLog
|
|
|
f96e0b |
+++ b/ChangeLog
|
|
|
f96e0b |
@@ -1,5 +1,9 @@
|
|
|
f96e0b |
2013-04-12 Vladimir Serbinenko <phcoder@gmail.com>
|
|
|
f96e0b |
|
|
|
f96e0b |
+ Replace stpcpy with grub_stpcpy in tools.
|
|
|
f96e0b |
+
|
|
|
f96e0b |
+2013-04-12 Vladimir Serbinenko <phcoder@gmail.com>
|
|
|
f96e0b |
+
|
|
|
f96e0b |
Handle Japanese special keys.
|
|
|
f96e0b |
Reported by: Hiroyuki YAMAMORI.
|
|
|
f96e0b |
Codes supplied by: Hiroyuki YAMAMORI.
|
|
|
f96e0b |
diff --git a/util/getroot.c b/util/getroot.c
|
|
|
f96e0b |
index f65fd1e..4ea8e65 100644
|
|
|
f96e0b |
--- a/util/getroot.c
|
|
|
f96e0b |
+++ b/util/getroot.c
|
|
|
f96e0b |
@@ -667,14 +667,14 @@ grub_find_root_devices_from_mountinfo (const char *dir, char **relroot)
|
|
|
f96e0b |
char *ptr;
|
|
|
f96e0b |
*relroot = xmalloc (strlen (entries[i].enc_root) +
|
|
|
f96e0b |
2 + strlen (dir));
|
|
|
f96e0b |
- ptr = stpcpy (*relroot, entries[i].enc_root);
|
|
|
f96e0b |
+ ptr = grub_stpcpy (*relroot, entries[i].enc_root);
|
|
|
f96e0b |
if (strlen (dir) > strlen (entries[i].enc_path))
|
|
|
f96e0b |
{
|
|
|
f96e0b |
while (ptr > *relroot && *(ptr - 1) == '/')
|
|
|
f96e0b |
ptr--;
|
|
|
f96e0b |
if (dir[strlen (entries[i].enc_path)] != '/')
|
|
|
f96e0b |
*ptr++ = '/';
|
|
|
f96e0b |
- ptr = stpcpy (ptr, dir + strlen (entries[i].enc_path));
|
|
|
f96e0b |
+ ptr = grub_stpcpy (ptr, dir + strlen (entries[i].enc_path));
|
|
|
f96e0b |
}
|
|
|
f96e0b |
*ptr = 0;
|
|
|
f96e0b |
}
|
|
|
f96e0b |
diff --git a/util/grub-fstest.c b/util/grub-fstest.c
|
|
|
f96e0b |
index 253dee8..aa2ef7a 100644
|
|
|
f96e0b |
--- a/util/grub-fstest.c
|
|
|
f96e0b |
+++ b/util/grub-fstest.c
|
|
|
f96e0b |
@@ -289,10 +289,10 @@ cmd_cmp (char *src, char *dest)
|
|
|
f96e0b |
+ strlen (entry->d_name));
|
|
|
f96e0b |
destnew = xmalloc (strlen (dest) + sizeof ("/")
|
|
|
f96e0b |
+ strlen (entry->d_name));
|
|
|
f96e0b |
- ptr = stpcpy (srcnew, src);
|
|
|
f96e0b |
+ ptr = grub_stpcpy (srcnew, src);
|
|
|
f96e0b |
*ptr++ = '/';
|
|
|
f96e0b |
strcpy (ptr, entry->d_name);
|
|
|
f96e0b |
- ptr = stpcpy (destnew, dest);
|
|
|
f96e0b |
+ ptr = grub_stpcpy (destnew, dest);
|
|
|
f96e0b |
*ptr++ = '/';
|
|
|
f96e0b |
strcpy (ptr, entry->d_name);
|
|
|
f96e0b |
|
|
|
f96e0b |
diff --git a/util/grub-probe.c b/util/grub-probe.c
|
|
|
f96e0b |
index b66cbea..a46f0b1 100644
|
|
|
f96e0b |
--- a/util/grub-probe.c
|
|
|
f96e0b |
+++ b/util/grub-probe.c
|
|
|
f96e0b |
@@ -499,7 +499,7 @@ probe (const char *path, char **device_names, char delim)
|
|
|
f96e0b |
{
|
|
|
f96e0b |
char *tmp = xmalloc (strlen (ofpath) + sizeof ("ieee1275/"));
|
|
|
f96e0b |
char *p;
|
|
|
f96e0b |
- p = stpcpy (tmp, "ieee1275/");
|
|
|
f96e0b |
+ p = grub_stpcpy (tmp, "ieee1275/");
|
|
|
f96e0b |
strcpy (p, ofpath);
|
|
|
f96e0b |
printf ("--hint-ieee1275='");
|
|
|
f96e0b |
print_full_name (tmp, dev);
|
|
|
f96e0b |
@@ -616,7 +616,7 @@ probe (const char *path, char **device_names, char delim)
|
|
|
f96e0b |
{
|
|
|
f96e0b |
char *tmp = xmalloc (strlen (ofpath) + sizeof ("ieee1275/"));
|
|
|
f96e0b |
char *p;
|
|
|
f96e0b |
- p = stpcpy (tmp, "ieee1275/");
|
|
|
f96e0b |
+ p = grub_stpcpy (tmp, "ieee1275/");
|
|
|
f96e0b |
strcpy (p, ofpath);
|
|
|
f96e0b |
print_full_name (tmp, dev);
|
|
|
f96e0b |
free (tmp);
|
|
|
f96e0b |
--
|
|
|
f96e0b |
1.8.2.1
|
|
|
f96e0b |
|