2010-01-27 Carles Pina i Estany <carles@pina.cat>
* util/lvm.c: New macro LVM_DEV_MAPPER_STRING. (grub_util_lvm_isvolume): Use LVM_DEV_MAPPER_STRING.
This commit is contained in:
parent
aa2f9dd26d
commit
254e2ce596
2 changed files with 10 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
2010-01-27 Carles Pina i Estany <carles@pina.cat>
|
||||
|
||||
* util/lvm.c: New macro LVM_DEV_MAPPER_STRING.
|
||||
(grub_util_lvm_isvolume): Use LVM_DEV_MAPPER_STRING.
|
||||
|
||||
2010-01-26 Carles Pina i Estany <carles@pina.cat>
|
||||
|
||||
* util/bin2h.c (usage): Fix warning (space after backslash).
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#define LVM_DEV_MAPPER_STRING "/dev/mapper/"
|
||||
|
||||
int
|
||||
grub_util_lvm_isvolume (char *name)
|
||||
{
|
||||
|
@ -33,10 +35,10 @@ grub_util_lvm_isvolume (char *name)
|
|||
struct stat st;
|
||||
int err;
|
||||
|
||||
devname = xmalloc (strlen (name) + 13);
|
||||
devname = xmalloc (strlen (name) + sizeof (LVM_DEV_MAPPER_STRING));
|
||||
|
||||
strcpy (devname, "/dev/mapper/");
|
||||
strcpy (devname+12, name);
|
||||
strcpy (devname, LVM_DEV_MAPPER_STRING);
|
||||
strcpy (devname + sizeof(LVM_DEV_MAPPER_STRING) - 1, name);
|
||||
|
||||
err = stat (devname, &st);
|
||||
free (devname);
|
||||
|
|
Loading…
Reference in a new issue