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