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:
carles 2010-01-16 00:26:52 +00:00
parent a0b766fc9b
commit 70a14d3d49
24 changed files with 168 additions and 134 deletions

View file

@ -1,3 +1,34 @@
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.
2010-01-15 Vladimir Serbinenko <phcoder@gmail.com> 2010-01-15 Vladimir Serbinenko <phcoder@gmail.com>
Enable multiboot on non-pc. Enable multiboot on non-pc.

View file

@ -328,7 +328,7 @@ static void
usage (int status) usage (int status)
{ {
if (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 else
printf ("\ printf ("\
Usage: %s -o FILE [OPTION]... [MODULES]\n\ Usage: %s -o FILE [OPTION]... [MODULES]\n\

View file

@ -115,14 +115,14 @@ grub_get_prefix (const char *dir)
saved_cwd = xgetcwd (); saved_cwd = xgetcwd ();
if (chdir (dir) < 0) if (chdir (dir) < 0)
grub_util_error ("Cannot change directory to `%s'", dir); grub_util_error ("cannot change directory to `%s'", dir);
abs_dir = xgetcwd (); abs_dir = xgetcwd ();
strip_extra_slashes (abs_dir); strip_extra_slashes (abs_dir);
prev_dir = xstrdup (abs_dir); prev_dir = xstrdup (abs_dir);
if (stat (".", &prev_st) < 0) if (stat (".", &prev_st) < 0)
grub_util_error ("Cannot stat `%s'", dir); grub_util_error ("cannot stat `%s'", dir);
if (! S_ISDIR (prev_st.st_mode)) if (! S_ISDIR (prev_st.st_mode))
grub_util_error ("`%s' is not a directory", dir); grub_util_error ("`%s' is not a directory", dir);
@ -130,13 +130,13 @@ grub_get_prefix (const char *dir)
while (1) while (1)
{ {
if (chdir ("..") < 0) if (chdir ("..") < 0)
grub_util_error ("Cannot change directory to the parent"); grub_util_error ("cannot change directory to the parent");
if (stat (".", &st) < 0) if (stat (".", &st) < 0)
grub_util_error ("Cannot stat current directory"); grub_util_error ("cannot stat current directory");
if (! S_ISDIR (st.st_mode)) if (! S_ISDIR (st.st_mode))
grub_util_error ("Current directory is not a directory???"); grub_util_error ("current directory is not a directory???");
if (prev_st.st_dev != st.st_dev || prev_st.st_ino == st.st_ino) if (prev_st.st_dev != st.st_dev || prev_st.st_ino == st.st_ino)
break; break;
@ -153,7 +153,7 @@ grub_get_prefix (const char *dir)
strip_extra_slashes (prefix); strip_extra_slashes (prefix);
if (chdir (saved_cwd) < 0) if (chdir (saved_cwd) < 0)
grub_util_error ("Cannot change directory to `%s'", dir); grub_util_error ("cannot change directory to `%s'", dir);
#ifdef __CYGWIN__ #ifdef __CYGWIN__
if (st.st_dev != (DEV_CYGDRIVE_MAJOR << 16)) if (st.st_dev != (DEV_CYGDRIVE_MAJOR << 16))
@ -236,7 +236,7 @@ find_root_device (const char *dir, dev_t dev)
if (res) if (res)
{ {
if (chdir (saved_cwd) < 0) if (chdir (saved_cwd) < 0)
grub_util_error ("Cannot restore the original directory"); grub_util_error ("cannot restore the original directory");
free (saved_cwd); free (saved_cwd);
closedir (dp); closedir (dp);
@ -279,7 +279,7 @@ find_root_device (const char *dir, dev_t dev)
continue; continue;
if (chdir (saved_cwd) < 0) if (chdir (saved_cwd) < 0)
grub_util_error ("Cannot restore the original directory"); grub_util_error ("cannot restore the original directory");
free (saved_cwd); free (saved_cwd);
closedir (dp); closedir (dp);
@ -288,7 +288,7 @@ find_root_device (const char *dir, dev_t dev)
} }
if (chdir (saved_cwd) < 0) if (chdir (saved_cwd) < 0)
grub_util_error ("Cannot restore the original directory"); grub_util_error ("cannot restore the original directory");
free (saved_cwd); free (saved_cwd);
closedir (dp); closedir (dp);
@ -445,7 +445,7 @@ grub_guess_root_device (const char *dir)
struct stat st; struct stat st;
if (stat (dir, &st) < 0) if (stat (dir, &st) < 0)
grub_util_error ("Cannot stat `%s'", dir); grub_util_error ("cannot stat `%s'", dir);
#ifdef __CYGWIN__ #ifdef __CYGWIN__
/* Cygwin specific function. */ /* Cygwin specific function. */
@ -591,7 +591,7 @@ grub_util_get_grub_dev (const char *os_dev)
free (p); free (p);
} }
else else
grub_util_error ("Unknown kind of RAID device `%s'", os_dev); grub_util_error ("unknown kind of RAID device `%s'", os_dev);
break; break;
@ -608,7 +608,7 @@ grub_util_check_block_device (const char *blk_dev)
struct stat st; struct stat st;
if (stat (blk_dev, &st) < 0) if (stat (blk_dev, &st) < 0)
grub_util_error ("Cannot stat `%s'", blk_dev); grub_util_error ("cannot stat `%s'", blk_dev);
if (S_ISBLK (st.st_mode)) if (S_ISBLK (st.st_mode))
return (blk_dev); return (blk_dev);
@ -622,7 +622,7 @@ grub_util_check_char_device (const char *blk_dev)
struct stat st; struct stat st;
if (stat (blk_dev, &st) < 0) if (stat (blk_dev, &st) < 0)
grub_util_error ("Cannot stat `%s'", blk_dev); grub_util_error ("cannot stat `%s'", blk_dev);
if (S_ISCHR (st.st_mode)) if (S_ISCHR (st.st_mode))
return (blk_dev); return (blk_dev);

View file

@ -69,7 +69,7 @@ static void
usage (int status) usage (int status)
{ {
if (status) if (status)
fprintf (stderr, "Try ``grub-editenv --help'' for more information.\n"); fprintf (stderr, "Try `grub-editenv --help' for more information.\n");
else else
printf ("\ printf ("\
Usage: grub-editenv [OPTIONS] [FILENAME] COMMAND\n\ Usage: grub-editenv [OPTIONS] [FILENAME] COMMAND\n\

View file

@ -129,7 +129,7 @@ usage (int status)
{ {
if (status) if (status)
fprintf (stderr, fprintf (stderr,
"Try ``grub-emu --help'' for more information.\n"); "Try `grub-emu --help' for more information.\n");
else else
printf ( printf (
"Usage: grub-emu [OPTION]...\n" "Usage: grub-emu [OPTION]...\n"
@ -220,14 +220,14 @@ main (int argc, char *argv[])
{ {
char *device_name = grub_guess_root_device (dir); char *device_name = grub_guess_root_device (dir);
if (! device_name) if (! device_name)
grub_util_error ("cannot find a device for %s.\n", dir); grub_util_error ("cannot find a device for %s", dir);
root_dev = grub_util_get_grub_dev (device_name); root_dev = grub_util_get_grub_dev (device_name);
if (! root_dev) if (! root_dev)
{ {
grub_util_info ("guessing the root device failed, because of `%s'", grub_util_info ("guessing the root device failed, because of `%s'",
grub_errmsg); grub_errmsg);
grub_util_error ("Cannot guess the root device. Specify the option ``--root-device''."); grub_util_error ("cannot guess the root device. Specify the option `--root-device'");
} }
} }

View file

@ -71,7 +71,7 @@ execute_command (char *name, int n, char **args)
cmd = grub_command_find (name); cmd = grub_command_find (name);
if (! cmd) 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); 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); dev = grub_device_open (0);
if ((! dev) || (! dev->disk)) 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); (unsigned long long) dev->disk->total_sectors);
if (! leng) 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; len = (leng > BUF_SIZE) ? BUF_SIZE : leng;
if (grub_disk_read (dev->disk, 0, skip, len, buf)) 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); skip, len);
if (hook (skip, buf, 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); file = grub_file_open (pathname);
if (!file) if (!file)
{ {
grub_util_error ("cannot open file %s.", pathname); grub_util_error ("cannot open file %s", pathname);
return; 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) 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; 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); sz = grub_file_read (file, buf, (len > BUF_SIZE) ? BUF_SIZE : len);
if (sz < 0) if (sz < 0)
{ {
grub_util_error ("read error at offset %llu.", ofs); grub_util_error ("read error at offset %llu", ofs);
break; break;
} }
@ -184,7 +184,7 @@ cmd_cp (char *src, char *dest)
if ((int) fwrite (buf, 1, len, ff) != len) if ((int) fwrite (buf, 1, len, ff) != len)
{ {
grub_util_error ("write error."); grub_util_error ("write error");
return 1; return 1;
} }
@ -194,7 +194,7 @@ cmd_cp (char *src, char *dest)
ff = fopen (dest, "wb"); ff = fopen (dest, "wb");
if (ff == NULL) if (ff == NULL)
{ {
grub_util_error ("open error."); grub_util_error ("open error");
return; return;
} }
read_file (src, cp_hook); read_file (src, cp_hook);
@ -212,7 +212,7 @@ cmd_cmp (char *src, char *dest)
{ {
if ((int) fread (buf_1, 1, len, ff) != len) 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; return 1;
} }
@ -223,7 +223,7 @@ cmd_cmp (char *src, char *dest)
for (i = 0; i < len; i++, ofs++) for (i = 0; i < len; i++, ofs++)
if (buf_1[i] != buf[i]) 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; return 1;
} }
} }
@ -233,12 +233,12 @@ cmd_cmp (char *src, char *dest)
ff = fopen (dest, "rb"); ff = fopen (dest, "rb");
if (ff == NULL) if (ff == NULL)
{ {
grub_util_error ("open error."); grub_util_error ("open error");
return; return;
} }
if ((skip) && (fseeko (ff, skip, SEEK_SET))) if ((skip) && (fseeko (ff, skip, SEEK_SET)))
grub_util_error ("seek error."); grub_util_error ("seek error");
read_file (src, cmp_hook); read_file (src, cmp_hook);
fclose (ff); 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++) for (i = 0; i < num_disks; i++)
{ {
if (grub_strlen (images[i]) + 7 > sizeof (host_file)) 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 (loop_name, "loop%d", i);
grub_sprintf (host_file, "(host)%s", images[i]); grub_sprintf (host_file, "(host)%s", images[i]);
if (execute_command ("loopback", 3, argv)) if (execute_command ("loopback", 3, argv))
grub_util_error ("loopback command fails."); grub_util_error ("loopback command fails");
} }
grub_lvm_fini (); grub_lvm_fini ();
@ -349,7 +349,7 @@ static void
usage (int status) usage (int status)
{ {
if (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 else
printf ("\ printf ("\
Usage: %s [OPTION]... IMAGE_PATH COMMANDS\n\ Usage: %s [OPTION]... IMAGE_PATH COMMANDS\n\

View file

@ -84,7 +84,7 @@ usage (int status)
{ {
if (status) if (status)
fprintf (stderr, fprintf (stderr,
"Try ``%s --help'' for more information.\n", program_name); "Try `%s --help' for more information.\n", program_name);
else else
printf ("\ printf ("\
Usage: %s [OPTION]...\n\ Usage: %s [OPTION]...\n\

View file

@ -96,7 +96,7 @@ static void
usage (int status) usage (int status)
{ {
if (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 else
printf ("\ printf ("\
Usage: %s [OPTIONS] FONT_FILES\n\ Usage: %s [OPTIONS] FONT_FILES\n\
@ -347,7 +347,7 @@ write_font (struct grub_font_info *font_info, char *output_file)
file = fopen (output_file, "wb"); file = fopen (output_file, "wb");
if (! file) if (! file)
grub_util_error ("Can\'t write to file %s.", output_file); grub_util_error ("can\'t write to file %s.", output_file);
offset = 0; offset = 0;
@ -546,7 +546,7 @@ main (int argc, char *argv[])
a = strtoul (p, &p, 0); a = strtoul (p, &p, 0);
if (*p != '-') if (*p != '-')
grub_util_error ("Invalid font range"); grub_util_error ("invalid font range");
b = strtoul (p + 1, &p, 0); b = strtoul (p + 1, &p, 0);
if ((font_info.num_range & (GRUB_FONT_RANGE_BLOCK - 1)) == 0) if ((font_info.num_range & (GRUB_FONT_RANGE_BLOCK - 1)) == 0)
font_info.ranges = xrealloc (font_info.ranges, font_info.ranges = xrealloc (font_info.ranges,
@ -561,7 +561,7 @@ main (int argc, char *argv[])
if (*p) if (*p)
{ {
if (*p != ',') if (*p != ',')
grub_util_error ("Invalid font range"); grub_util_error ("invalid font range");
else else
p++; p++;
} }
@ -598,7 +598,7 @@ main (int argc, char *argv[])
} }
if (! output_file) if (! output_file)
grub_util_error ("No output file is specified."); grub_util_error ("no output file is specified");
if (FT_Init_FreeType (&ft_lib)) if (FT_Init_FreeType (&ft_lib))
grub_util_error ("FT_Init_FreeType fails"); grub_util_error ("FT_Init_FreeType fails");
@ -610,7 +610,7 @@ main (int argc, char *argv[])
if (FT_New_Face (ft_lib, argv[optind], font_index, &ft_face)) if (FT_New_Face (ft_lib, argv[optind], font_index, &ft_face))
{ {
grub_util_info ("Can't open file %s, index %d\n", argv[optind], grub_util_info ("can't open file %s, index %d", argv[optind],
font_index); font_index);
continue; continue;
} }

View file

@ -74,7 +74,7 @@ static void
usage (int status) usage (int status)
{ {
if (status) if (status)
fprintf (stderr, "Try ``grub-scrypt --help'' for more information.\n"); fprintf (stderr, "Try `grub-scrypt --help' for more information.\n");
else else
printf ("\ printf ("\
Usage: grub-scrypt [OPTIONS]\n\ Usage: grub-scrypt [OPTIONS]\n\
@ -165,12 +165,12 @@ main (int argc, char *argv[])
bufhex = malloc (buflen * 2 + 1); bufhex = malloc (buflen * 2 + 1);
if (!bufhex) if (!bufhex)
grub_util_error ("Out of memory"); grub_util_error ("out of memory");
buf = malloc (buflen); buf = malloc (buflen);
if (!buf) if (!buf)
{ {
free (bufhex); free (bufhex);
grub_util_error ("Out of memory"); grub_util_error ("out of memory");
} }
salt = malloc (saltlen); salt = malloc (saltlen);
@ -178,7 +178,7 @@ main (int argc, char *argv[])
{ {
free (bufhex); free (bufhex);
free (buf); free (buf);
grub_util_error ("Out of memory"); grub_util_error ("out of memory");
} }
salthex = malloc (saltlen * 2 + 1); salthex = malloc (saltlen * 2 + 1);
if (!salthex) if (!salthex)
@ -186,7 +186,7 @@ main (int argc, char *argv[])
free (salt); free (salt);
free (bufhex); free (bufhex);
free (buf); free (buf);
grub_util_error ("Out of memory"); grub_util_error ("out of memory");
} }
/* Disable echoing. Based on glibc. */ /* Disable echoing. Based on glibc. */
@ -225,7 +225,7 @@ main (int argc, char *argv[])
/* Restore the original setting. */ /* Restore the original setting. */
if (tty_changed) if (tty_changed)
(void) tcsetattr (fileno (in), TCSAFLUSH, &s); (void) tcsetattr (fileno (in), TCSAFLUSH, &s);
grub_util_error ("Failure to read password"); grub_util_error ("failure to read password");
} }
if (nr >= 1 && pass1[nr-1] == '\n') if (nr >= 1 && pass1[nr-1] == '\n')
pass1[nr-1] = 0; pass1[nr-1] = 0;
@ -249,7 +249,7 @@ main (int argc, char *argv[])
free (bufhex); free (bufhex);
free (salthex); free (salthex);
free (salt); free (salt);
grub_util_error ("Failure to read password"); grub_util_error ("failure to read password");
} }
if (nr >= 1 && pass2[nr-1] == '\n') if (nr >= 1 && pass2[nr-1] == '\n')
pass2[nr-1] = 0; pass2[nr-1] = 0;
@ -264,7 +264,7 @@ main (int argc, char *argv[])
free (bufhex); free (bufhex);
free (salthex); free (salthex);
free (salt); free (salt);
grub_util_error ("Passwords don't match"); grub_util_error ("passwords don't match");
} }
memset (pass2, 0, strlen (pass2)); memset (pass2, 0, strlen (pass2));
free (pass2); free (pass2);
@ -286,7 +286,7 @@ main (int argc, char *argv[])
free (salthex); free (salthex);
free (salt); free (salt);
fclose (f); fclose (f);
grub_util_error ("Couldn't retrieve random data for salt"); grub_util_error ("couldn't retrieve random data for salt");
} }
rd = fread (salt, 1, saltlen, f); rd = fread (salt, 1, saltlen, f);
if (rd != saltlen) if (rd != saltlen)
@ -299,7 +299,7 @@ main (int argc, char *argv[])
free (salthex); free (salthex);
free (salt); free (salt);
fclose (f); fclose (f);
grub_util_error ("Couldn't retrieve random data for salt"); grub_util_error ("couldn't retrieve random data for salt");
} }
fclose (f); fclose (f);
} }
@ -321,7 +321,7 @@ main (int argc, char *argv[])
memset (salthex, 0, 2 * saltlen); memset (salthex, 0, 2 * saltlen);
free (salt); free (salt);
free (salthex); free (salthex);
grub_util_error ("Cryptographic error number %d", gcry_err); grub_util_error ("cryptographic error number %d", gcry_err);
} }
hexify (bufhex, buf, buflen); hexify (bufhex, buf, buflen);

View file

@ -34,7 +34,7 @@ static void
usage (int status) usage (int status)
{ {
if (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 else
printf ("\ printf ("\
Usage: %s [OPTIONS] PATH\n\ Usage: %s [OPTIONS] PATH\n\

View file

@ -40,7 +40,7 @@ static void
usage (int status) usage (int status)
{ {
if (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 else
printf ("\ printf ("\
Usage: %s [OPTIONS] input [output]\n\ Usage: %s [OPTIONS] input [output]\n\
@ -182,7 +182,7 @@ write_section_data (FILE* fp, char *image,
char name[5 + strlen (pe_shdr->name)]; char name[5 + strlen (pe_shdr->name)];
if (num_sections >= MAX_SECTIONS) if (num_sections >= MAX_SECTIONS)
grub_util_error ("Too many sections"); grub_util_error ("too many sections");
sprintf (name, ".rel%s", pe_shdr->name); sprintf (name, ".rel%s", pe_shdr->name);
@ -230,14 +230,14 @@ write_reloc_section (FILE* fp, char *image,
if ((pe_rel->symtab_index >= pe_chdr->num_symbols) || if ((pe_rel->symtab_index >= pe_chdr->num_symbols) ||
(symtab_map[pe_rel->symtab_index] == -1)) (symtab_map[pe_rel->symtab_index] == -1))
grub_util_error ("Invalid symbol"); grub_util_error ("invalid symbol");
if (pe_rel->type == GRUB_PE32_REL_I386_DIR32) if (pe_rel->type == GRUB_PE32_REL_I386_DIR32)
type = R_386_32; type = R_386_32;
else if (pe_rel->type == GRUB_PE32_REL_I386_REL32) else if (pe_rel->type == GRUB_PE32_REL_I386_REL32)
type = R_386_PC32; type = R_386_PC32;
else else
grub_util_error ("Unknown pe relocation type %d\n", pe_rel->type); grub_util_error ("unknown pe relocation type %d\n", pe_rel->type);
ofs = pe_rel->offset - pe_sec->virtual_address; ofs = pe_rel->offset - pe_sec->virtual_address;
addr = (grub_uint32_t *)(image + pe_sec->raw_data_offset + ofs); addr = (grub_uint32_t *)(image + pe_sec->raw_data_offset + ofs);
@ -248,14 +248,14 @@ write_reloc_section (FILE* fp, char *image,
code = image[pe_sec->raw_data_offset + ofs - 1]; code = image[pe_sec->raw_data_offset + ofs - 1];
if (((code != 0xe8) && (code != 0xe9)) || (*addr)) if (((code != 0xe8) && (code != 0xe9)) || (*addr))
grub_util_error ("Invalid relocation (%x %x)", code, *addr); grub_util_error ("invalid relocation (%x %x)", code, *addr);
modified = 1; modified = 1;
if (symtab[symtab_map[pe_rel->symtab_index]].st_shndx) if (symtab[symtab_map[pe_rel->symtab_index]].st_shndx)
{ {
if (symtab[symtab_map[pe_rel->symtab_index]].st_shndx if (symtab[symtab_map[pe_rel->symtab_index]].st_shndx
!= shdr[i].sh_info) != shdr[i].sh_info)
grub_util_error ("Cross section call is not allowed"); grub_util_error ("cross section call is not allowed");
*addr = (symtab[symtab_map[pe_rel->symtab_index]].st_value *addr = (symtab[symtab_map[pe_rel->symtab_index]].st_value
- ofs - 4); - ofs - 4);
@ -440,7 +440,7 @@ convert_pe (FILE* fp, char *image)
pe_chdr = (struct grub_pe32_coff_header *) image; pe_chdr = (struct grub_pe32_coff_header *) image;
if (grub_le_to_cpu16 (pe_chdr->machine) != GRUB_PE32_MACHINE_I386) if (grub_le_to_cpu16 (pe_chdr->machine) != GRUB_PE32_MACHINE_I386)
grub_util_error ("Invalid coff image"); grub_util_error ("invalid coff image");
strtab = xmalloc (STRTAB_BLOCK); strtab = xmalloc (STRTAB_BLOCK);
strtab_max = STRTAB_BLOCK; strtab_max = STRTAB_BLOCK;

View file

@ -84,7 +84,7 @@ probe_partmap (grub_disk_t disk)
{ {
if (disk->partition == NULL) if (disk->partition == NULL)
{ {
grub_util_info ("No partition map found for %s", disk->name); grub_util_info ("no partition map found for %s", disk->name);
return; return;
} }
@ -113,17 +113,17 @@ probe (const char *path, char *device_name)
{ {
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
if (! grub_util_check_char_device (device_name)) if (! grub_util_check_char_device (device_name))
grub_util_error ("%s is not a character device.\n", device_name); grub_util_error ("%s is not a character device", device_name);
#else #else
if (! grub_util_check_block_device (device_name)) if (! grub_util_check_block_device (device_name))
grub_util_error ("%s is not a block device.\n", device_name); grub_util_error ("%s is not a block device", device_name);
#endif #endif
} }
else else
device_name = grub_guess_root_device (path); device_name = grub_guess_root_device (path);
if (! device_name) if (! device_name)
grub_util_error ("cannot find a device for %s (is /dev mounted?).\n", path); grub_util_error ("cannot find a device for %s (is /dev mounted?)", path);
if (print == PRINT_DEVICE) if (print == PRINT_DEVICE)
{ {
@ -133,7 +133,7 @@ probe (const char *path, char *device_name)
drive_name = grub_util_get_grub_dev (device_name); drive_name = grub_util_get_grub_dev (device_name);
if (! drive_name) if (! drive_name)
grub_util_error ("Cannot find a GRUB drive for %s. Check your device.map.\n", device_name); grub_util_error ("cannot find a GRUB drive for %s. Check your device.map", device_name);
if (print == PRINT_DRIVE) if (print == PRINT_DRIVE)
{ {
@ -309,7 +309,7 @@ usage (int status)
{ {
if (status) if (status)
fprintf (stderr, fprintf (stderr,
"Try ``%s --help'' for more information.\n", program_name); "Try `%s --help' for more information.\n", program_name);
else else
printf ("\ printf ("\
Usage: %s [OPTION]... [PATH|DEVICE]\n\ Usage: %s [OPTION]... [PATH|DEVICE]\n\

View file

@ -568,7 +568,7 @@ read_device_map (const char *dev_map)
fp = fopen (dev_map, "r"); fp = fopen (dev_map, "r");
if (! fp) if (! fp)
{ {
grub_util_info (_("Cannot open `%s'"), dev_map); grub_util_info (_("cannot open `%s'"), dev_map);
return; return;
} }
@ -639,7 +639,7 @@ read_device_map (const char *dev_map)
symbolic links. */ symbolic links. */
map[drive].device = xmalloc (PATH_MAX); map[drive].device = xmalloc (PATH_MAX);
if (! realpath (p, map[drive].device)) if (! realpath (p, map[drive].device))
grub_util_error ("Cannot get the real path of `%s'", p); grub_util_error ("cannot get the real path of `%s'", p);
#else #else
map[drive].device = xstrdup (p); map[drive].device = xstrdup (p);
#endif #endif

View file

@ -778,7 +778,7 @@ make_reloc_section (FILE *out, Elf_Addr current_address, Elf_Ehdr *e,
if ((ELF_R_TYPE (info) == R_X86_64_32) || if ((ELF_R_TYPE (info) == R_X86_64_32) ||
(ELF_R_TYPE (info) == R_X86_64_32S)) (ELF_R_TYPE (info) == R_X86_64_32S))
{ {
grub_util_error ("Can\'t add fixup entry for R_X86_64_32(S)"); grub_util_error ("can\'t add fixup entry for R_X86_64_32(S)");
} }
else if (ELF_R_TYPE (info) == R_X86_64_64) else if (ELF_R_TYPE (info) == R_X86_64_64)
{ {
@ -1029,7 +1029,7 @@ static void
usage (int status) usage (int status)
{ {
if (status) if (status)
fprintf (stderr, "Try ``grub-mkimage --help'' for more information.\n"); fprintf (stderr, "Try `grub-mkimage --help' for more information.\n");
else else
printf ("\ printf ("\
Usage: grub-mkimage -o FILE [OPTION]... [MODULES]\n\ Usage: grub-mkimage -o FILE [OPTION]... [MODULES]\n\

View file

@ -289,7 +289,7 @@ generate_image (const char *dir, char *prefix, FILE *out, char *mods[],
#ifdef GRUB_MACHINE_PCBIOS #ifdef GRUB_MACHINE_PCBIOS
if (GRUB_KERNEL_MACHINE_LINK_ADDR + core_size > GRUB_MEMORY_MACHINE_UPPER) if (GRUB_KERNEL_MACHINE_LINK_ADDR + core_size > GRUB_MEMORY_MACHINE_UPPER)
grub_util_error (_("Core image is too big (%p > %p)\n"), grub_util_error (_("core image is too big (%p > %p)"),
GRUB_KERNEL_MACHINE_LINK_ADDR + core_size, GRUB_MEMORY_MACHINE_UPPER); GRUB_KERNEL_MACHINE_LINK_ADDR + core_size, GRUB_MEMORY_MACHINE_UPPER);
#endif #endif
@ -326,7 +326,7 @@ static void
usage (int status) usage (int status)
{ {
if (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 else
printf (_("\ printf (_("\
Usage: grub-mkimage [OPTION]... [MODULES]\n\ Usage: grub-mkimage [OPTION]... [MODULES]\n\

View file

@ -156,7 +156,7 @@ setup (const char *dir,
sector, offset, length); sector, offset, length);
if (offset != 0 || length != GRUB_DISK_SECTOR_SIZE) if (offset != 0 || length != GRUB_DISK_SECTOR_SIZE)
grub_util_error (_("The first sector of the core file is not sector-aligned")); grub_util_error (_("the first sector of the core file is not sector-aligned"));
first_sector = sector; first_sector = sector;
} }
@ -170,7 +170,7 @@ setup (const char *dir,
sector, offset, length, (unsigned) current_segment); sector, offset, length, (unsigned) current_segment);
if (offset != 0 || last_length != GRUB_DISK_SECTOR_SIZE) if (offset != 0 || last_length != GRUB_DISK_SECTOR_SIZE)
grub_util_error (_("Non-sector-aligned data is found in the core file")); grub_util_error (_("non-sector-aligned data is found in the core file"));
if (block != first_block if (block != first_block
&& (grub_le_to_cpu64 (prev->start) && (grub_le_to_cpu64 (prev->start)
@ -184,7 +184,7 @@ setup (const char *dir,
block--; block--;
if (block->len) if (block->len)
grub_util_error (_("The sectors of the core file are too fragmented")); grub_util_error (_("the sectors of the core file are too fragmented"));
} }
last_length = length; last_length = length;
@ -195,7 +195,7 @@ setup (const char *dir,
boot_path = grub_util_get_path (dir, boot_file); boot_path = grub_util_get_path (dir, boot_file);
boot_size = grub_util_get_image_size (boot_path); boot_size = grub_util_get_image_size (boot_path);
if (boot_size != GRUB_DISK_SECTOR_SIZE) if (boot_size != GRUB_DISK_SECTOR_SIZE)
grub_util_error (_("The size of `%s' is not %u"), grub_util_error (_("the size of `%s' is not %u"),
boot_path, GRUB_DISK_SECTOR_SIZE); boot_path, GRUB_DISK_SECTOR_SIZE);
boot_img = grub_util_read_image (boot_path); boot_img = grub_util_read_image (boot_path);
free (boot_path); free (boot_path);
@ -212,9 +212,9 @@ setup (const char *dir,
core_sectors = ((core_size + GRUB_DISK_SECTOR_SIZE - 1) core_sectors = ((core_size + GRUB_DISK_SECTOR_SIZE - 1)
>> GRUB_DISK_SECTOR_BITS); >> GRUB_DISK_SECTOR_BITS);
if (core_size < GRUB_DISK_SECTOR_SIZE) if (core_size < GRUB_DISK_SECTOR_SIZE)
grub_util_error (_("The size of `%s' is too small"), core_path); grub_util_error (_("the size of `%s' is too small"), core_path);
else if (core_size > 0xFFFF * GRUB_DISK_SECTOR_SIZE) else if (core_size > 0xFFFF * GRUB_DISK_SECTOR_SIZE)
grub_util_error (_("The size of `%s' is too large"), core_path); grub_util_error (_("the size of `%s' is too large"), core_path);
core_img = grub_util_read_image (core_path); core_img = grub_util_read_image (core_path);
@ -251,7 +251,7 @@ setup (const char *dir,
grub_fs_t fs; grub_fs_t fs;
fs = grub_fs_probe (dest_dev); fs = grub_fs_probe (dest_dev);
if (! fs) if (! fs)
grub_util_error (_("Unable to identify a filesystem in %s; safety check can't be performed"), grub_util_error (_("unable to identify a filesystem in %s; safety check can't be performed"),
dest_dev->disk->name); dest_dev->disk->name);
if (! fs->reserved_first_sector) if (! fs->reserved_first_sector)
@ -304,7 +304,7 @@ setup (const char *dir,
bsd_part = -1; bsd_part = -1;
} }
else else
grub_util_error (_("No DOS-style partitions found")); grub_util_error (_("no DOS-style partitions found"));
} }
else else
dos_part = bsd_part = -1; dos_part = bsd_part = -1;
@ -413,14 +413,14 @@ setup (const char *dir,
unable_to_embed: unable_to_embed:
if (must_embed) if (must_embed)
grub_util_error (_("Embedding is not possible, but this is required when " grub_util_error (_("embedding is not possible, but this is required when "
"the root device is on a RAID array or LVM volume.")); "the root device is on a RAID array or LVM volume"));
grub_util_warn (_("Embedding is not possible. GRUB can only be installed in this " grub_util_warn (_("Embedding is not possible. GRUB can only be installed in this "
"setup by using blocklists. However, blocklists are UNRELIABLE and " "setup by using blocklists. However, blocklists are UNRELIABLE and "
"its use is discouraged.")); "its use is discouraged."));
if (! force) if (! force)
grub_util_error (_("If you really want blocklists, use --force.")); grub_util_error (_("if you really want blocklists, use --force"));
/* Make sure that GRUB reads the identical image as the OS. */ /* Make sure that GRUB reads the identical image as the OS. */
tmp_img = xmalloc (core_size); tmp_img = xmalloc (core_size);
@ -495,7 +495,7 @@ unable_to_embed:
} }
if (i == MAX_TRIES) if (i == MAX_TRIES)
grub_util_error (_("Cannot read `%s' correctly"), core_path_dev); grub_util_error (_("cannot read `%s' correctly"), core_path_dev);
/* Clean out the blocklists. */ /* Clean out the blocklists. */
block = first_block; block = first_block;
@ -508,7 +508,7 @@ unable_to_embed:
block--; block--;
if ((char *) block <= core_img) if ((char *) block <= core_img)
grub_util_error (_("No terminator in the core image")); grub_util_error (_("no terminator in the core image"));
} }
/* Now read the core image to determine where the sectors are. */ /* Now read the core image to determine where the sectors are. */
@ -519,13 +519,13 @@ unable_to_embed:
file->read_hook = save_first_sector; file->read_hook = save_first_sector;
if (grub_file_read (file, tmp_img, GRUB_DISK_SECTOR_SIZE) if (grub_file_read (file, tmp_img, GRUB_DISK_SECTOR_SIZE)
!= GRUB_DISK_SECTOR_SIZE) != GRUB_DISK_SECTOR_SIZE)
grub_util_error (_("Failed to read the first sector of the core image")); grub_util_error (_("failed to read the first sector of the core image"));
block = first_block; block = first_block;
file->read_hook = save_blocklists; file->read_hook = save_blocklists;
if (grub_file_read (file, tmp_img, core_size - GRUB_DISK_SECTOR_SIZE) if (grub_file_read (file, tmp_img, core_size - GRUB_DISK_SECTOR_SIZE)
!= (grub_ssize_t) core_size - GRUB_DISK_SECTOR_SIZE) != (grub_ssize_t) core_size - GRUB_DISK_SECTOR_SIZE)
grub_util_error (_("Failed to read the rest sectors of the core image")); grub_util_error (_("failed to read the rest sectors of the core image"));
grub_file_close (file); grub_file_close (file);
@ -544,7 +544,7 @@ unable_to_embed:
grub_util_info ("opening the core image `%s'", core_path); grub_util_info ("opening the core image `%s'", core_path);
fp = fopen (core_path, "r+b"); fp = fopen (core_path, "r+b");
if (! fp) if (! fp)
grub_util_error (_("Cannot open `%s'"), core_path); grub_util_error (_("cannot open `%s'"), core_path);
grub_util_write_image (core_img, GRUB_DISK_SECTOR_SIZE * 2, fp); grub_util_write_image (core_img, GRUB_DISK_SECTOR_SIZE * 2, fp);
fclose (fp); fclose (fp);
@ -584,13 +584,13 @@ static void
usage (int status) usage (int status)
{ {
if (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 else
printf (_("\ printf (_("\
Usage: grub-setup [OPTION]... DEVICE\n\ Usage: grub-setup [OPTION]... DEVICE\n\
\n\ \n\
Set up images to boot from DEVICE.\n\ Set up images to boot from DEVICE.\n\
DEVICE must be a GRUB device (e.g. ``(hd0,1)'').\n\ DEVICE must be a GRUB device (e.g. `(hd0,1)').\n\
\n\ \n\
-b, --boot-image=FILE use FILE as the boot image [default=%s]\n\ -b, --boot-image=FILE use FILE as the boot image [default=%s]\n\
-c, --core-image=FILE use FILE as the core image [default=%s]\n\ -c, --core-image=FILE use FILE as the core image [default=%s]\n\
@ -751,7 +751,7 @@ main (int argc, char *argv[])
char *tmp = get_device_name (root_dev); char *tmp = get_device_name (root_dev);
if (! tmp) if (! tmp)
grub_util_error (_("Invalid root device `%s'"), root_dev); grub_util_error (_("invalid root device `%s'"), root_dev);
tmp = xstrdup (tmp); tmp = xstrdup (tmp);
free (root_dev); free (root_dev);
@ -764,7 +764,7 @@ main (int argc, char *argv[])
{ {
grub_util_info ("guessing the root device failed, because of `%s'", grub_util_info ("guessing the root device failed, because of `%s'",
grub_errmsg); grub_errmsg);
grub_util_error (_("Cannot guess the root device. Specify the option ``--root-device''.")); grub_util_error (_("cannot guess the root device. Specify the option `--root-device'"));
} }
} }

View file

@ -131,12 +131,12 @@ block_device_get_sysfs_path_and_link(const char *devicenode,
snprintf(sysfs_path, sysfs_path_len, "/sys/block/%s", devicenode); snprintf(sysfs_path, sysfs_path_len, "/sys/block/%s", devicenode);
if (!realpath (sysfs_path, rpath)) if (!realpath (sysfs_path, rpath))
grub_util_error ("Cannot get the real path of `%s'", sysfs_path); grub_util_error ("cannot get the real path of `%s'", sysfs_path);
strcat(rpath, "/device"); strcat(rpath, "/device");
if (!realpath (rpath, sysfs_path)) if (!realpath (rpath, sysfs_path))
grub_util_error ("Cannot get the real path of `%s'", rpath); grub_util_error ("cannot get the real path of `%s'", rpath);
free (rpath); free (rpath);
} }
@ -247,12 +247,12 @@ vendor_is_ATA(const char *path)
snprintf(buf, PATH_MAX, "%s/vendor", path); snprintf(buf, PATH_MAX, "%s/vendor", path);
fd = open(buf, O_RDONLY); fd = open(buf, O_RDONLY);
if (fd < 0) if (fd < 0)
grub_util_error ("Cannot open 'vendor' node of `%s'", path); grub_util_error ("cannot open 'vendor' node of `%s'", path);
memset(buf, 0, PATH_MAX); memset(buf, 0, PATH_MAX);
err = read(fd, buf, PATH_MAX); err = read(fd, buf, PATH_MAX);
if (err < 0) if (err < 0)
grub_util_error ("Cannot read 'vendor' node of `%s'", path); grub_util_error ("cannot read 'vendor' node of `%s'", path);
close(fd); close(fd);
@ -288,7 +288,7 @@ check_sas (char *sysfs_path, int *tgt)
fd = open(path, O_RDONLY); fd = open(path, O_RDONLY);
if (fd < 0) if (fd < 0)
grub_util_error("Cannot open SAS PHY ID '%s'\n", path); grub_util_error("cannot open SAS PHY ID `%s'\n", path);
memset (phy, 0, sizeof (phy)); memset (phy, 0, sizeof (phy));
read (fd, phy, sizeof (phy)); read (fd, phy, sizeof (phy));
@ -375,7 +375,7 @@ grub_util_devname_to_ofpath (char *devname)
name_buf = xmalloc (PATH_MAX); name_buf = xmalloc (PATH_MAX);
name_buf = realpath (devname, name_buf); name_buf = realpath (devname, name_buf);
if (! name_buf) if (! name_buf)
grub_util_error ("Cannot get the real path of `%s'", devname); grub_util_error ("cannot get the real path of `%s'", devname);
device = get_basename (devname); device = get_basename (devname);
devnode = strip_trailing_digits (devname); devnode = strip_trailing_digits (devname);

View file

@ -60,11 +60,12 @@ grub_util_warn (const char *fmt, ...)
{ {
va_list ap; va_list ap;
fprintf (stderr, "%s: warn: ", program_name); fprintf (stderr, _("%s: warn:"), program_name);
fprintf (stderr, " ");
va_start (ap, fmt); va_start (ap, fmt);
vfprintf (stderr, fmt, ap); vfprintf (stderr, fmt, ap);
va_end (ap); va_end (ap);
fputc ('\n', stderr); fprintf (stderr, ".\n");
fflush (stderr); fflush (stderr);
} }
@ -75,11 +76,12 @@ grub_util_info (const char *fmt, ...)
{ {
va_list ap; va_list ap;
fprintf (stderr, "%s: info: ", program_name); fprintf (stderr, _("%s: info:"), program_name);
fprintf (stderr, " ");
va_start (ap, fmt); va_start (ap, fmt);
vfprintf (stderr, fmt, ap); vfprintf (stderr, fmt, ap);
va_end (ap); va_end (ap);
fputc ('\n', stderr); fprintf (".\n", stderr);
fflush (stderr); fflush (stderr);
} }
} }
@ -89,11 +91,12 @@ grub_util_error (const char *fmt, ...)
{ {
va_list ap; va_list ap;
fprintf (stderr, "%s: error: ", program_name); fprintf (stderr, _("%s: error:"), program_name);
fprintf (stderr, " ");
va_start (ap, fmt); va_start (ap, fmt);
vfprintf (stderr, fmt, ap); vfprintf (stderr, fmt, ap);
va_end (ap); va_end (ap);
fputc ('\n', stderr); fprintf (stderr, ".\n");
exit (1); exit (1);
} }

View file

@ -288,7 +288,7 @@ void FDECL1(get_torito_desc, struct eltorito_boot_descriptor *, boot_desc)
struct eltorito_boot_info bi_table; struct eltorito_boot_info bi_table;
bootimage = fopen (de->whole_name, "r+b"); bootimage = fopen (de->whole_name, "r+b");
if (bootimage == NULL) if (bootimage == NULL)
error (1, errno, _("Error opening boot image file '%s' for update"), error (1, errno, _("Error opening boot image file `%s' for update"),
de->whole_name); de->whole_name);
/* Compute checksum of boot image, sans 64 bytes */ /* Compute checksum of boot image, sans 64 bytes */
total_len = 0; total_len = 0;
@ -296,7 +296,7 @@ void FDECL1(get_torito_desc, struct eltorito_boot_descriptor *, boot_desc)
while ((len = fread (csum_buffer, 1, SECTOR_SIZE, bootimage)) > 0) while ((len = fread (csum_buffer, 1, SECTOR_SIZE, bootimage)) > 0)
{ {
if (total_len & 3) if (total_len & 3)
error (1, 0, _("Odd alignment at non-end-of-file in boot image '%s'"), error (1, 0, _("Odd alignment at non-end-of-file in boot image `%s'"),
de->whole_name); de->whole_name);
if (total_len < 64) if (total_len < 64)
memset (csum_buffer, 0, 64 - total_len); memset (csum_buffer, 0, 64 - total_len);
@ -308,7 +308,7 @@ void FDECL1(get_torito_desc, struct eltorito_boot_descriptor *, boot_desc)
} }
if (total_len != de->size) if (total_len != de->size)
error (1, 0, _("Boot image file '%s' changed unexpectedly"), error (1, 0, _("Boot image file `%s' changed unexpectedly"),
de->whole_name); de->whole_name);
/* End of file, set position to byte 8 */ /* End of file, set position to byte 8 */
fseeko (bootimage, (off_t) 8, SEEK_SET); fseeko (bootimage, (off_t) 8, SEEK_SET);

View file

@ -306,7 +306,7 @@ int deep_opt;
* the symbolic link won't fit into one SL System Use Field * the symbolic link won't fit into one SL System Use Field
* print an error message and continue with splited one * print an error message and continue with splited one
*/ */
fprintf (stderr, _("symbolic link ``%s'' too long for one SL System Use Field, splitting"), cpnt); fprintf (stderr, _("symbolic link `%s' too long for one SL System Use Field, splitting"), cpnt);
} }
if(MAYBE_ADD_CE_ENTRY(SL_SIZE + sl_bytes)) add_CE_entry(); if(MAYBE_ADD_CE_ENTRY(SL_SIZE + sl_bytes)) add_CE_entry();
} }

View file

@ -158,7 +158,7 @@ void FDECL4(xfwrite, void *, buffer, uint64_t, count, uint64_t, size, FILE *, fi
sprintf(nbuf, "%s_%02d", outfile, idx++); sprintf(nbuf, "%s_%02d", outfile, idx++);
file = freopen(nbuf, "wb", file); file = freopen(nbuf, "wb", file);
if (file == NULL) if (file == NULL)
error (1, errno, _("Cannot open '%s'"), nbuf); error (1, errno, _("Cannot open `%s'"), nbuf);
} }
while(count) while(count)

View file

@ -50,7 +50,7 @@ grub_util_getdiskname (int major, int minor)
else if (major == SCSI_DISK0_MAJOR) else if (major == SCSI_DISK0_MAJOR)
sprintf (name, "/dev/sd%c", 'a' + minor / 16); sprintf (name, "/dev/sd%c", 'a' + minor / 16);
else else
grub_util_error ("Unknown device number: %d, %d", major, minor); grub_util_error ("unknown device number: %d, %d", major, minor);
return name; return name;
} }
@ -72,7 +72,7 @@ grub_util_raid_getmembers (char *name)
fd = open (devname, O_RDONLY); fd = open (devname, O_RDONLY);
if (fd == -1) if (fd == -1)
grub_util_error ("Can't open %s: %s", devname, strerror (errno)); grub_util_error ("can't open %s: %s", devname, strerror (errno));
free (devname); free (devname);
@ -81,7 +81,7 @@ grub_util_raid_getmembers (char *name)
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) if (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); version.major, version.minor);
ret = ioctl (fd, GET_ARRAY_INFO, &info); ret = ioctl (fd, GET_ARRAY_INFO, &info);

View file

@ -191,7 +191,7 @@ static void
usage (int status) usage (int status)
{ {
if (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 else
printf ("\ printf ("\
Usage: %s [OPTION]... [MODULES]\n\ Usage: %s [OPTION]... [MODULES]\n\

View file

@ -161,7 +161,7 @@ setup (const char *prefix, const char *dir,
grub_util_info ("first sector is <%llu,%u,%u>", sector, offset, length); grub_util_info ("first sector is <%llu,%u,%u>", sector, offset, length);
if (offset != 0 || length != GRUB_DISK_SECTOR_SIZE) if (offset != 0 || length != GRUB_DISK_SECTOR_SIZE)
grub_util_error ("The first sector of the core file " grub_util_error ("the first sector of the core file "
"is not sector-aligned"); "is not sector-aligned");
first_sector = sector; first_sector = sector;
@ -176,7 +176,7 @@ setup (const char *prefix, const char *dir,
grub_util_info ("saving <%llu,%u,%u>", sector, offset, length); grub_util_info ("saving <%llu,%u,%u>", sector, offset, length);
if (offset != 0 || last_length != GRUB_DISK_SECTOR_SIZE) if (offset != 0 || last_length != GRUB_DISK_SECTOR_SIZE)
grub_util_error ("Non-sector-aligned data is found in the core file"); grub_util_error ("non-sector-aligned data is found in the core file");
if (block != first_block if (block != first_block
&& (grub_be_to_cpu64 (prev->start) && (grub_be_to_cpu64 (prev->start)
@ -189,7 +189,7 @@ setup (const char *prefix, const char *dir,
block--; block--;
if (block->len) if (block->len)
grub_util_error ("The sectors of the core file are too fragmented"); grub_util_error ("the sectors of the core file are too fragmented");
} }
last_length = length; last_length = length;
@ -201,7 +201,7 @@ setup (const char *prefix, const char *dir,
boot_path = grub_util_get_path (dir, boot_file); boot_path = grub_util_get_path (dir, boot_file);
boot_size = grub_util_get_image_size (boot_path); boot_size = grub_util_get_image_size (boot_path);
if (boot_size != GRUB_DISK_SECTOR_SIZE) if (boot_size != GRUB_DISK_SECTOR_SIZE)
grub_util_error ("The size of `%s' is not %d", grub_util_error ("the size of `%s' is not %d",
boot_path, GRUB_DISK_SECTOR_SIZE); boot_path, GRUB_DISK_SECTOR_SIZE);
boot_img = grub_util_read_image (boot_path); boot_img = grub_util_read_image (boot_path);
free (boot_path); free (boot_path);
@ -219,7 +219,7 @@ setup (const char *prefix, const char *dir,
core_sectors = ((core_size + GRUB_DISK_SECTOR_SIZE - 1) core_sectors = ((core_size + GRUB_DISK_SECTOR_SIZE - 1)
>> GRUB_DISK_SECTOR_BITS); >> GRUB_DISK_SECTOR_BITS);
if (core_size < GRUB_DISK_SECTOR_SIZE) if (core_size < GRUB_DISK_SECTOR_SIZE)
grub_util_error ("The size of `%s' is too small", core_path); grub_util_error ("the size of `%s' is too small", core_path);
core_img = grub_util_read_image (core_path); core_img = grub_util_read_image (core_path);
free (core_path); free (core_path);
@ -229,7 +229,7 @@ setup (const char *prefix, const char *dir,
+ GRUB_DISK_SECTOR_SIZE + GRUB_DISK_SECTOR_SIZE
- sizeof (*block)); - sizeof (*block));
grub_util_info ("root is '%s', dest is '%s', and dest_ofpath is '%s'", grub_util_info ("root is `%s', dest is `%s', and dest_ofpath is `%s'",
root, dest, dest_ofpath); root, dest, dest_ofpath);
/* Open the root device and the destination device. */ /* Open the root device and the destination device. */
@ -320,7 +320,7 @@ setup (const char *prefix, const char *dir,
} }
if (i == MAX_TRIES) if (i == MAX_TRIES)
grub_util_error ("Cannot read `%s' correctly", core_path); grub_util_error ("cannot read `%s' correctly", core_path);
/* Clean out the blocklists. */ /* Clean out the blocklists. */
block = first_block; block = first_block;
@ -332,7 +332,7 @@ setup (const char *prefix, const char *dir,
block--; block--;
if ((char *) block <= core_img) if ((char *) block <= core_img)
grub_util_error ("No terminator in the core image"); grub_util_error ("no terminator in the core image");
} }
/* Now read the core image to determine where the sectors are. */ /* Now read the core image to determine where the sectors are. */
@ -343,13 +343,13 @@ setup (const char *prefix, const char *dir,
file->read_hook = save_first_sector; file->read_hook = save_first_sector;
if (grub_file_read (file, tmp_img, GRUB_DISK_SECTOR_SIZE) if (grub_file_read (file, tmp_img, GRUB_DISK_SECTOR_SIZE)
!= GRUB_DISK_SECTOR_SIZE) != GRUB_DISK_SECTOR_SIZE)
grub_util_error ("Failed to read the first sector of the core image"); grub_util_error ("failed to read the first sector of the core image");
block = first_block; block = first_block;
file->read_hook = save_blocklists; file->read_hook = save_blocklists;
if (grub_file_read (file, tmp_img, core_size - GRUB_DISK_SECTOR_SIZE) if (grub_file_read (file, tmp_img, core_size - GRUB_DISK_SECTOR_SIZE)
!= (grub_ssize_t) core_size - GRUB_DISK_SECTOR_SIZE) != (grub_ssize_t) core_size - GRUB_DISK_SECTOR_SIZE)
grub_util_error ("Failed to read the rest sectors of the core image"); grub_util_error ("failed to read the rest sectors of the core image");
grub_file_close (file); grub_file_close (file);
@ -368,7 +368,7 @@ setup (const char *prefix, const char *dir,
grub_util_info ("opening the core image `%s'", core_path); grub_util_info ("opening the core image `%s'", core_path);
fp = fopen (core_path, "r+b"); fp = fopen (core_path, "r+b");
if (! fp) if (! fp)
grub_util_error ("Cannot open `%s'", core_path); grub_util_error ("cannot open `%s'", core_path);
grub_util_write_image (core_img, GRUB_DISK_SECTOR_SIZE, fp); grub_util_write_image (core_img, GRUB_DISK_SECTOR_SIZE, fp);
fclose (fp); fclose (fp);
@ -404,13 +404,13 @@ static void
usage (int status) usage (int status)
{ {
if (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 else
printf ("\ printf ("\
Usage: %s [OPTION]... DEVICE\n\ Usage: %s [OPTION]... DEVICE\n\
\n\ \n\
Set up images to boot from DEVICE.\n\ Set up images to boot from DEVICE.\n\
DEVICE must be a GRUB device (e.g. ``(hd0,1)'').\n\ DEVICE must be a GRUB device (e.g. `(hd0,1)').\n\
\n\ \n\
-b, --boot-image=FILE use FILE as the boot image [default=%s]\n\ -b, --boot-image=FILE use FILE as the boot image [default=%s]\n\
-c, --core-image=FILE use FILE as the core image [default=%s]\n\ -c, --core-image=FILE use FILE as the core image [default=%s]\n\
@ -559,14 +559,14 @@ find_dest_dev (struct grub_setup_info *gp, char *argv[])
fprintf (stderr, "Invalid device `%s'.\n", argv[optind]); fprintf (stderr, "Invalid device `%s'.\n", argv[optind]);
usage (1); usage (1);
} }
grub_util_info ("transformed OS device '%s' into GRUB device '%s'", grub_util_info ("transformed OS device `%s' into GRUB device `%s'",
argv[optind], gp->dest_dev); argv[optind], gp->dest_dev);
} }
else else
{ {
/* For simplicity. */ /* For simplicity. */
gp->dest_dev = xstrdup (gp->dest_dev); gp->dest_dev = xstrdup (gp->dest_dev);
grub_util_info ("Using '%s' as GRUB device", gp->dest_dev); grub_util_info ("Using `%s' as GRUB device", gp->dest_dev);
} }
} }
@ -578,7 +578,7 @@ check_root_dev (struct grub_setup_info *gp)
char *tmp = get_device_name (gp->root_dev); char *tmp = get_device_name (gp->root_dev);
if (! tmp) if (! tmp)
grub_util_error ("Invalid root device `%s'", gp->root_dev); grub_util_error ("invalid root device `%s'", gp->root_dev);
tmp = xstrdup (tmp); tmp = xstrdup (tmp);
free (gp->root_dev); free (gp->root_dev);
@ -594,11 +594,11 @@ check_root_dev (struct grub_setup_info *gp)
{ {
grub_util_info ("guessing the root device failed, because of `%s'", grub_util_info ("guessing the root device failed, because of `%s'",
grub_errmsg); grub_errmsg);
grub_util_error ("Cannot guess the root device. " grub_util_error ("cannot guess the root device. "
"Specify the option ``--root-device''."); "Specify the option `--root-device'");
} }
grub_util_info ("Guessed root device '%s' and root_dev '%s' from " grub_util_info ("guessed root device `%s' and root_dev `%s' from "
"dir '%s'", root_device, gp->root_dev, dir); "dir `%s'", root_device, gp->root_dev, dir);
} }
} }