* grub-core/commands/efi/fixvideo.c: Gettextize.
* grub-core/commands/hashsum.c: Likewise. * grub-core/commands/i386/cmostest.c: Likewise. * grub-core/commands/i386/pc/drivemap.c: Likewise. * grub-core/commands/i386/pc/lsapm.c: Likewise. * grub-core/commands/i386/pc/sendkey.c: Likewise. * grub-core/commands/lsmmap.c: Likewise. * grub-core/commands/menuentry.c: Likewise. * grub-core/commands/mips/loongson/lsspd.c: Likewise. * grub-core/commands/setpci.c: Likewise. * grub-core/loader/i386/bsd.c: Likewise. * grub-core/loader/i386/linux.c: Likewise. * util/getroot.c: Likewise. * util/grub-editenv.c: Likewise. * util/grub-fstest.c: Likewise. * util/grub-mkfont.c: Likewise. * util/grub-mkimage.c: Likewise. * util/grub-mkpasswd-pbkdf2.c: Likewise. * util/grub-pe2elf.c: Likewise. * util/grub-probe.c: Likewise. * util/grub-setup.c: Likewise. * util/ieee1275/ofpath.c: Likewise. * util/misc.c: Likewise. * util/raid.c: Likewise.
This commit is contained in:
parent
b50787de09
commit
10f0117bf9
25 changed files with 302 additions and 260 deletions
13
util/raid.c
13
util/raid.c
|
@ -33,6 +33,7 @@
|
|||
#include <linux/major.h>
|
||||
#include <linux/raid/md_p.h>
|
||||
#include <linux/raid/md_u.h>
|
||||
#include <grub/i18n.h>
|
||||
|
||||
char **
|
||||
grub_util_raid_getmembers (const char *name, int bootable)
|
||||
|
@ -46,26 +47,26 @@ grub_util_raid_getmembers (const char *name, int bootable)
|
|||
fd = open (name, O_RDONLY);
|
||||
|
||||
if (fd == -1)
|
||||
grub_util_error ("can't open %s: %s", name, strerror (errno));
|
||||
grub_util_error (_("can't open %s: %s"), name, strerror (errno));
|
||||
|
||||
ret = ioctl (fd, RAID_VERSION, &version);
|
||||
if (ret != 0)
|
||||
grub_util_error ("ioctl RAID_VERSION error: %s", strerror (errno));
|
||||
grub_util_error (_("ioctl RAID_VERSION error: %s"), strerror (errno));
|
||||
|
||||
if ((version.major != 0 || version.minor != 90)
|
||||
&& (version.major != 1 || version.minor != 0)
|
||||
&& (version.major != 1 || version.minor != 1)
|
||||
&& (version.major != 1 || version.minor != 2))
|
||||
grub_util_error ("unsupported RAID version: %d.%d",
|
||||
grub_util_error (_("unsupported RAID version: %d.%d"),
|
||||
version.major, version.minor);
|
||||
|
||||
if (bootable && (version.major != 0 || version.minor != 90))
|
||||
grub_util_error ("unsupported RAID version: %d.%d",
|
||||
grub_util_error (_("unsupported RAID version: %d.%d"),
|
||||
version.major, version.minor);
|
||||
|
||||
ret = ioctl (fd, GET_ARRAY_INFO, &info);
|
||||
if (ret != 0)
|
||||
grub_util_error ("ioctl GET_ARRAY_INFO error: %s", strerror (errno));
|
||||
grub_util_error (_("ioctl GET_ARRAY_INFO error: %s"), strerror (errno));
|
||||
|
||||
devicelist = xmalloc ((info.nr_disks + 1) * sizeof (char *));
|
||||
|
||||
|
@ -74,7 +75,7 @@ grub_util_raid_getmembers (const char *name, int bootable)
|
|||
disk.number = i;
|
||||
ret = ioctl (fd, GET_DISK_INFO, &disk);
|
||||
if (ret != 0)
|
||||
grub_util_error ("ioctl GET_DISK_INFO error: %s", strerror (errno));
|
||||
grub_util_error (_("ioctl GET_DISK_INFO error: %s"), strerror (errno));
|
||||
|
||||
if (disk.state & (1 << MD_DISK_ACTIVE))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue