zbyszek / rpms / grub2

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