Replace stpcpy with grub_stpcpy in tools.
This commit is contained in:
parent
bbdd6305db
commit
ba44ca6d1a
4 changed files with 10 additions and 6 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2013-04-12 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
Replace stpcpy with grub_stpcpy in tools.
|
||||||
|
|
||||||
2013-04-12 Vladimir Serbinenko <phcoder@gmail.com>
|
2013-04-12 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
Handle Japanese special keys.
|
Handle Japanese special keys.
|
||||||
|
|
|
@ -667,14 +667,14 @@ grub_find_root_devices_from_mountinfo (const char *dir, char **relroot)
|
||||||
char *ptr;
|
char *ptr;
|
||||||
*relroot = xmalloc (strlen (entries[i].enc_root) +
|
*relroot = xmalloc (strlen (entries[i].enc_root) +
|
||||||
2 + strlen (dir));
|
2 + strlen (dir));
|
||||||
ptr = stpcpy (*relroot, entries[i].enc_root);
|
ptr = grub_stpcpy (*relroot, entries[i].enc_root);
|
||||||
if (strlen (dir) > strlen (entries[i].enc_path))
|
if (strlen (dir) > strlen (entries[i].enc_path))
|
||||||
{
|
{
|
||||||
while (ptr > *relroot && *(ptr - 1) == '/')
|
while (ptr > *relroot && *(ptr - 1) == '/')
|
||||||
ptr--;
|
ptr--;
|
||||||
if (dir[strlen (entries[i].enc_path)] != '/')
|
if (dir[strlen (entries[i].enc_path)] != '/')
|
||||||
*ptr++ = '/';
|
*ptr++ = '/';
|
||||||
ptr = stpcpy (ptr, dir + strlen (entries[i].enc_path));
|
ptr = grub_stpcpy (ptr, dir + strlen (entries[i].enc_path));
|
||||||
}
|
}
|
||||||
*ptr = 0;
|
*ptr = 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -289,10 +289,10 @@ cmd_cmp (char *src, char *dest)
|
||||||
+ strlen (entry->d_name));
|
+ strlen (entry->d_name));
|
||||||
destnew = xmalloc (strlen (dest) + sizeof ("/")
|
destnew = xmalloc (strlen (dest) + sizeof ("/")
|
||||||
+ strlen (entry->d_name));
|
+ strlen (entry->d_name));
|
||||||
ptr = stpcpy (srcnew, src);
|
ptr = grub_stpcpy (srcnew, src);
|
||||||
*ptr++ = '/';
|
*ptr++ = '/';
|
||||||
strcpy (ptr, entry->d_name);
|
strcpy (ptr, entry->d_name);
|
||||||
ptr = stpcpy (destnew, dest);
|
ptr = grub_stpcpy (destnew, dest);
|
||||||
*ptr++ = '/';
|
*ptr++ = '/';
|
||||||
strcpy (ptr, entry->d_name);
|
strcpy (ptr, entry->d_name);
|
||||||
|
|
||||||
|
|
|
@ -499,7 +499,7 @@ probe (const char *path, char **device_names, char delim)
|
||||||
{
|
{
|
||||||
char *tmp = xmalloc (strlen (ofpath) + sizeof ("ieee1275/"));
|
char *tmp = xmalloc (strlen (ofpath) + sizeof ("ieee1275/"));
|
||||||
char *p;
|
char *p;
|
||||||
p = stpcpy (tmp, "ieee1275/");
|
p = grub_stpcpy (tmp, "ieee1275/");
|
||||||
strcpy (p, ofpath);
|
strcpy (p, ofpath);
|
||||||
printf ("--hint-ieee1275='");
|
printf ("--hint-ieee1275='");
|
||||||
print_full_name (tmp, dev);
|
print_full_name (tmp, dev);
|
||||||
|
@ -616,7 +616,7 @@ probe (const char *path, char **device_names, char delim)
|
||||||
{
|
{
|
||||||
char *tmp = xmalloc (strlen (ofpath) + sizeof ("ieee1275/"));
|
char *tmp = xmalloc (strlen (ofpath) + sizeof ("ieee1275/"));
|
||||||
char *p;
|
char *p;
|
||||||
p = stpcpy (tmp, "ieee1275/");
|
p = grub_stpcpy (tmp, "ieee1275/");
|
||||||
strcpy (p, ofpath);
|
strcpy (p, ofpath);
|
||||||
print_full_name (tmp, dev);
|
print_full_name (tmp, dev);
|
||||||
free (tmp);
|
free (tmp);
|
||||||
|
|
Loading…
Reference in a new issue