2010-01-16 Carles Pina i Estany <carles@pina.cat>
* util/misc.c (grub_util_warn): Gettextizze, print full stop after the message. (grub_util_info): Likewise. (grub_util_error): Likewise. * util/elf/grub-mkimage.c: Fix capitalisation, quotes, full stops and/or new lines in `grub_util_warna', `grub_util_info', `grub_util_error' calls. * util/getroot.c: Likewise. * util/grub-editenv.c: Likewise. * util/grub-emu.c: Likewise. * util/grub-fstest.c: Likewise. * util/grub-mkdevicemap.c: Likewise. * util/grub-mkfont.c: Likewise. * util/grub-mkpasswd-pbkdf2.c: Likewise. * util/grub-mkrelpath.c: Likewise. * util/grub-pe2elf.c: Likewise. * util/grub-probe.c: Likewise. * util/hostdisk.c: Likewise. * util/i386/efi/grub-mkimage.c: Likewise. * util/i386/pc/grub-mkimage.c: Likewise. * util/i386/pc/grub-setup.c: Likewise. * util/ieee1275/ofpath.c: Likewise. * util/mkisofs/eltorito.c: Likewise. * util/mkisofs/rock.c: Likewise. * util/mkisofs/write.c: Likewise. * util/raid.c: Likewise. * util/sparc64/ieee1275/grub-mkimage.c: Likewise. * util/sparc64/ieee1275/grub-setup.c: Likewise.
This commit is contained in:
parent
a0b766fc9b
commit
70a14d3d49
24 changed files with 168 additions and 134 deletions
|
@ -71,7 +71,7 @@ execute_command (char *name, int n, char **args)
|
|||
|
||||
cmd = grub_command_find (name);
|
||||
if (! cmd)
|
||||
grub_util_error ("Can\'t find command %s", name);
|
||||
grub_util_error ("can\'t find command %s", name);
|
||||
|
||||
return (cmd->func) (cmd, n, args);
|
||||
}
|
||||
|
@ -100,9 +100,9 @@ read_file (char *pathname, int (*hook) (grub_off_t ofs, char *buf, int len))
|
|||
|
||||
dev = grub_device_open (0);
|
||||
if ((! dev) || (! dev->disk))
|
||||
grub_util_error ("Can\'t open device.");
|
||||
grub_util_error ("can\'t open device");
|
||||
|
||||
grub_util_info ("total sectors : %lld.",
|
||||
grub_util_info ("total sectors : %lld",
|
||||
(unsigned long long) dev->disk->total_sectors);
|
||||
|
||||
if (! leng)
|
||||
|
@ -115,7 +115,7 @@ read_file (char *pathname, int (*hook) (grub_off_t ofs, char *buf, int len))
|
|||
len = (leng > BUF_SIZE) ? BUF_SIZE : leng;
|
||||
|
||||
if (grub_disk_read (dev->disk, 0, skip, len, buf))
|
||||
grub_util_error ("Disk read fails at offset %lld, length %d.",
|
||||
grub_util_error ("disk read fails at offset %lld, length %d",
|
||||
skip, len);
|
||||
|
||||
if (hook (skip, buf, len))
|
||||
|
@ -132,15 +132,15 @@ read_file (char *pathname, int (*hook) (grub_off_t ofs, char *buf, int len))
|
|||
file = grub_file_open (pathname);
|
||||
if (!file)
|
||||
{
|
||||
grub_util_error ("cannot open file %s.", pathname);
|
||||
grub_util_error ("cannot open file %s", pathname);
|
||||
return;
|
||||
}
|
||||
|
||||
grub_util_info ("file size : %lld.", (unsigned long long) file->size);
|
||||
grub_util_info ("file size : %lld", (unsigned long long) file->size);
|
||||
|
||||
if (skip > file->size)
|
||||
{
|
||||
grub_util_error ("invalid skip value %lld.", (unsigned long long) skip);
|
||||
grub_util_error ("invalid skip value %lld", (unsigned long long) skip);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -158,7 +158,7 @@ read_file (char *pathname, int (*hook) (grub_off_t ofs, char *buf, int len))
|
|||
sz = grub_file_read (file, buf, (len > BUF_SIZE) ? BUF_SIZE : len);
|
||||
if (sz < 0)
|
||||
{
|
||||
grub_util_error ("read error at offset %llu.", ofs);
|
||||
grub_util_error ("read error at offset %llu", ofs);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -184,7 +184,7 @@ cmd_cp (char *src, char *dest)
|
|||
|
||||
if ((int) fwrite (buf, 1, len, ff) != len)
|
||||
{
|
||||
grub_util_error ("write error.");
|
||||
grub_util_error ("write error");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -194,7 +194,7 @@ cmd_cp (char *src, char *dest)
|
|||
ff = fopen (dest, "wb");
|
||||
if (ff == NULL)
|
||||
{
|
||||
grub_util_error ("open error.");
|
||||
grub_util_error ("open error");
|
||||
return;
|
||||
}
|
||||
read_file (src, cp_hook);
|
||||
|
@ -212,7 +212,7 @@ cmd_cmp (char *src, char *dest)
|
|||
{
|
||||
if ((int) fread (buf_1, 1, len, ff) != len)
|
||||
{
|
||||
grub_util_error ("read error at offset %llu.", ofs);
|
||||
grub_util_error ("read error at offset %llu", ofs);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -223,7 +223,7 @@ cmd_cmp (char *src, char *dest)
|
|||
for (i = 0; i < len; i++, ofs++)
|
||||
if (buf_1[i] != buf[i])
|
||||
{
|
||||
grub_util_error ("compare fail at offset %llu.", ofs);
|
||||
grub_util_error ("compare fail at offset %llu", ofs);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
@ -233,12 +233,12 @@ cmd_cmp (char *src, char *dest)
|
|||
ff = fopen (dest, "rb");
|
||||
if (ff == NULL)
|
||||
{
|
||||
grub_util_error ("open error.");
|
||||
grub_util_error ("open error");
|
||||
return;
|
||||
}
|
||||
|
||||
if ((skip) && (fseeko (ff, skip, SEEK_SET)))
|
||||
grub_util_error ("seek error.");
|
||||
grub_util_error ("seek error");
|
||||
|
||||
read_file (src, cmp_hook);
|
||||
fclose (ff);
|
||||
|
@ -286,13 +286,13 @@ fstest (char **images, int num_disks, int cmd, int n, char **args)
|
|||
for (i = 0; i < num_disks; i++)
|
||||
{
|
||||
if (grub_strlen (images[i]) + 7 > sizeof (host_file))
|
||||
grub_util_error ("Pathname %s too long.", images[i]);
|
||||
grub_util_error ("pathname %s too long", images[i]);
|
||||
|
||||
grub_sprintf (loop_name, "loop%d", i);
|
||||
grub_sprintf (host_file, "(host)%s", images[i]);
|
||||
|
||||
if (execute_command ("loopback", 3, argv))
|
||||
grub_util_error ("loopback command fails.");
|
||||
grub_util_error ("loopback command fails");
|
||||
}
|
||||
|
||||
grub_lvm_fini ();
|
||||
|
@ -349,7 +349,7 @@ static void
|
|||
usage (int status)
|
||||
{
|
||||
if (status)
|
||||
fprintf (stderr, "Try ``%s --help'' for more information.\n", program_name);
|
||||
fprintf (stderr, "Try `%s --help' for more information.\n", program_name);
|
||||
else
|
||||
printf ("\
|
||||
Usage: %s [OPTION]... IMAGE_PATH COMMANDS\n\
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue