Merge from trunk
This commit is contained in:
commit
d94000ed13
210 changed files with 4949 additions and 2557 deletions
|
@ -182,14 +182,14 @@ grub_affs_mount (grub_disk_t disk)
|
|||
/* Make sure this is an affs filesystem. */
|
||||
if (grub_strncmp ((char *) (data->bblock.type), "DOS", 3))
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_FS, "not an affs filesystem");
|
||||
grub_error (GRUB_ERR_BAD_FS, "not an AFFS filesystem");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
/* Test if the filesystem is a OFS filesystem. */
|
||||
if (! (data->bblock.flags & GRUB_AFFS_FLAG_FFS))
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_FS, "ofs not yet supported");
|
||||
grub_error (GRUB_ERR_BAD_FS, "OFS not yet supported");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
@ -231,7 +231,7 @@ grub_affs_mount (grub_disk_t disk)
|
|||
}
|
||||
if (-checksum != checksumr)
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_FS, "affs blocksize could not be determined");
|
||||
grub_error (GRUB_ERR_BAD_FS, "AFFS blocksize couldn't be determined");
|
||||
goto fail;
|
||||
}
|
||||
blocksize++;
|
||||
|
@ -248,7 +248,7 @@ grub_affs_mount (grub_disk_t disk)
|
|||
|
||||
fail:
|
||||
if (grub_errno == GRUB_ERR_OUT_OF_RANGE)
|
||||
grub_error (GRUB_ERR_BAD_FS, "not an affs filesystem");
|
||||
grub_error (GRUB_ERR_BAD_FS, "not an AFFS filesystem");
|
||||
|
||||
grub_free (data);
|
||||
grub_free (rootblock);
|
||||
|
|
|
@ -88,7 +88,7 @@ grub_cpio_find_file (struct grub_cpio_data *data, char **name,
|
|||
return grub_errno;
|
||||
|
||||
if (hd.magic != MAGIC_BCPIO)
|
||||
return grub_error (GRUB_ERR_BAD_FS, "Invalid cpio archive");
|
||||
return grub_error (GRUB_ERR_BAD_FS, "invalid cpio archive");
|
||||
|
||||
data->size = (((grub_uint32_t) hd.filesize_1) << 16) + hd.filesize_2;
|
||||
|
||||
|
@ -130,7 +130,7 @@ grub_cpio_find_file (struct grub_cpio_data *data, char **name,
|
|||
}
|
||||
|
||||
if (grub_memcmp (hd.magic, MAGIC_USTAR, sizeof (MAGIC_USTAR) - 1))
|
||||
return grub_error (GRUB_ERR_BAD_FS, "Invalid tar archive");
|
||||
return grub_error (GRUB_ERR_BAD_FS, "invalid tar archive");
|
||||
|
||||
if ((*name = grub_strdup (hd.name)) == NULL)
|
||||
return grub_errno;
|
||||
|
|
3
fs/fat.c
3
fs/fat.c
|
@ -25,6 +25,7 @@
|
|||
#include <grub/mm.h>
|
||||
#include <grub/err.h>
|
||||
#include <grub/dl.h>
|
||||
#include <grub/charset.h>
|
||||
|
||||
#define GRUB_FAT_DIR_ENTRY_SIZE 32
|
||||
|
||||
|
@ -337,7 +338,7 @@ grub_fat_mount (grub_disk_t disk)
|
|||
fail:
|
||||
|
||||
grub_free (data);
|
||||
grub_error (GRUB_ERR_BAD_FS, "not a fat filesystem");
|
||||
grub_error (GRUB_ERR_BAD_FS, "not a FAT filesystem");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
30
fs/hfs.c
30
fs/hfs.c
|
@ -365,7 +365,7 @@ grub_hfs_mount (grub_disk_t disk)
|
|||
if (grub_hfs_find_node (data, (char *) &key, data->cat_root,
|
||||
0, (char *) &dir, sizeof (dir)) == 0)
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_FS, "can not find the hfs root directory");
|
||||
grub_error (GRUB_ERR_BAD_FS, "cannot find the HFS root directory");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
@ -379,7 +379,7 @@ grub_hfs_mount (grub_disk_t disk)
|
|||
grub_free (data);
|
||||
|
||||
if (grub_errno == GRUB_ERR_OUT_OF_RANGE)
|
||||
grub_error (GRUB_ERR_BAD_FS, "not a hfs filesystem");
|
||||
grub_error (GRUB_ERR_BAD_FS, "not a HFS filesystem");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1072,6 +1072,31 @@ grub_hfs_label (grub_device_t device, char **label)
|
|||
return grub_errno;
|
||||
}
|
||||
|
||||
static grub_err_t
|
||||
grub_hfs_uuid (grub_device_t device, char **uuid)
|
||||
{
|
||||
struct grub_hfs_data *data;
|
||||
|
||||
grub_dl_ref (my_mod);
|
||||
|
||||
data = grub_hfs_mount (device->disk);
|
||||
if (data && data->sblock.num_serial != 0)
|
||||
{
|
||||
*uuid = grub_malloc (16 + sizeof ('\0'));
|
||||
grub_sprintf (*uuid, "%016llx",
|
||||
(unsigned long long)
|
||||
grub_be_to_cpu64 (data->sblock.num_serial));
|
||||
}
|
||||
else
|
||||
*uuid = NULL;
|
||||
|
||||
grub_dl_unref (my_mod);
|
||||
|
||||
grub_free (data);
|
||||
|
||||
return grub_errno;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static struct grub_fs grub_hfs_fs =
|
||||
|
@ -1082,6 +1107,7 @@ static struct grub_fs grub_hfs_fs =
|
|||
.read = grub_hfs_read,
|
||||
.close = grub_hfs_close,
|
||||
.label = grub_hfs_label,
|
||||
.uuid = grub_hfs_uuid,
|
||||
.next = 0
|
||||
};
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include <grub/types.h>
|
||||
#include <grub/fshelp.h>
|
||||
#include <grub/hfs.h>
|
||||
#include <grub/charset.h>
|
||||
|
||||
#define GRUB_HFSPLUS_MAGIC 0x482B
|
||||
#define GRUB_HFSPLUSX_MAGIC 0x4858
|
||||
|
@ -501,7 +502,7 @@ grub_hfsplus_mount (grub_disk_t disk)
|
|||
fail:
|
||||
|
||||
if (grub_errno == GRUB_ERR_OUT_OF_RANGE)
|
||||
grub_error (GRUB_ERR_BAD_FS, "not a hfsplus filesystem");
|
||||
grub_error (GRUB_ERR_BAD_FS, "not a HFS+ filesystem");
|
||||
|
||||
grub_free (data);
|
||||
return 0;
|
||||
|
@ -652,7 +653,7 @@ grub_hfsplus_btree_search (struct grub_hfsplus_btree *btree,
|
|||
btree->nodesize, (char *) node) <= 0)
|
||||
{
|
||||
grub_free (node);
|
||||
return grub_error (GRUB_ERR_BAD_FS, "Couldn't read i-node.");
|
||||
return grub_error (GRUB_ERR_BAD_FS, "couldn't read i-node");
|
||||
}
|
||||
|
||||
nodedesc = (struct grub_hfsplus_btnode *) node;
|
||||
|
|
306
fs/i386/pc/pxe.c
306
fs/i386/pc/pxe.c
|
@ -1,7 +1,7 @@
|
|||
/* pxe.c - Driver to provide access to the pxe filesystem */
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2008 Free Software Foundation, Inc.
|
||||
* Copyright (C) 2008,2009 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -24,6 +24,7 @@
|
|||
#include <grub/file.h>
|
||||
#include <grub/misc.h>
|
||||
#include <grub/bufio.h>
|
||||
#include <grub/env.h>
|
||||
|
||||
#include <grub/machine/pxe.h>
|
||||
#include <grub/machine/memory.h>
|
||||
|
@ -33,11 +34,17 @@
|
|||
#define SEGOFS(x) ((SEGMENT(x) << 16) + OFFSET(x))
|
||||
#define LINEAR(x) (void *) (((x >> 16) <<4) + (x & 0xFFFF))
|
||||
|
||||
struct grub_pxe_disk_data
|
||||
{
|
||||
grub_uint32_t server_ip;
|
||||
grub_uint32_t gateway_ip;
|
||||
};
|
||||
|
||||
struct grub_pxenv *grub_pxe_pxenv;
|
||||
grub_uint32_t grub_pxe_your_ip;
|
||||
grub_uint32_t grub_pxe_server_ip;
|
||||
grub_uint32_t grub_pxe_gateway_ip;
|
||||
int grub_pxe_blksize = GRUB_PXE_MIN_BLKSIZE;
|
||||
static grub_uint32_t grub_pxe_your_ip;
|
||||
static grub_uint32_t grub_pxe_default_server_ip;
|
||||
static grub_uint32_t grub_pxe_default_gateway_ip;
|
||||
static unsigned grub_pxe_blksize = GRUB_PXE_MIN_BLKSIZE;
|
||||
|
||||
static grub_file_t curr_file = 0;
|
||||
|
||||
|
@ -56,24 +63,83 @@ grub_pxe_iterate (int (*hook) (const char *name))
|
|||
return 0;
|
||||
}
|
||||
|
||||
static grub_err_t
|
||||
parse_ip (const char *val, grub_uint32_t *ip, const char **rest)
|
||||
{
|
||||
grub_uint32_t newip = 0;
|
||||
unsigned long t;
|
||||
int i;
|
||||
const char *ptr = val;
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
t = grub_strtoul (ptr, (char **) &ptr, 0);
|
||||
if (grub_errno)
|
||||
return grub_errno;
|
||||
if (t & ~0xff)
|
||||
return grub_error (GRUB_ERR_OUT_OF_RANGE, "Invalid IP.");
|
||||
newip >>= 8;
|
||||
newip |= (t << 24);
|
||||
if (i != 3 && *ptr != '.')
|
||||
return grub_error (GRUB_ERR_OUT_OF_RANGE, "Invalid IP.");
|
||||
ptr++;
|
||||
}
|
||||
*ip = newip;
|
||||
if (rest)
|
||||
*rest = ptr - 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static grub_err_t
|
||||
grub_pxe_open (const char *name, grub_disk_t disk)
|
||||
{
|
||||
if (grub_strcmp (name, "pxe"))
|
||||
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "not a pxe disk");
|
||||
struct grub_pxe_disk_data *data;
|
||||
|
||||
if (grub_strcmp (name, "pxe") != 0
|
||||
&& grub_strncmp (name, "pxe:", sizeof ("pxe:") - 1) != 0)
|
||||
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "not a pxe disk");
|
||||
|
||||
data = grub_malloc (sizeof (*data));
|
||||
if (!data)
|
||||
return grub_errno;
|
||||
|
||||
if (grub_strncmp (name, "pxe:", sizeof ("pxe:") - 1) == 0)
|
||||
{
|
||||
const char *ptr;
|
||||
grub_err_t err;
|
||||
|
||||
ptr = name + sizeof ("pxe:") - 1;
|
||||
err = parse_ip (ptr, &(data->server_ip), &ptr);
|
||||
if (err)
|
||||
return err;
|
||||
if (*ptr == ':')
|
||||
{
|
||||
err = parse_ip (ptr + 1, &(data->server_ip), 0);
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
else
|
||||
data->gateway_ip = grub_pxe_default_gateway_ip;
|
||||
}
|
||||
else
|
||||
{
|
||||
data->server_ip = grub_pxe_default_server_ip;
|
||||
data->gateway_ip = grub_pxe_default_gateway_ip;
|
||||
}
|
||||
|
||||
disk->total_sectors = 0;
|
||||
disk->id = (unsigned long) "pxe";
|
||||
disk->id = (unsigned long) data;
|
||||
|
||||
disk->has_partitions = 0;
|
||||
disk->data = 0;
|
||||
disk->data = data;
|
||||
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
||||
static void
|
||||
grub_pxe_close (grub_disk_t disk __attribute((unused)))
|
||||
grub_pxe_close (grub_disk_t disk)
|
||||
{
|
||||
grub_free (disk->data);
|
||||
}
|
||||
|
||||
static grub_err_t
|
||||
|
@ -107,9 +173,11 @@ static struct grub_disk_dev grub_pxe_dev =
|
|||
};
|
||||
|
||||
static grub_err_t
|
||||
grub_pxefs_dir (grub_device_t device UNUSED, const char *path UNUSED,
|
||||
grub_pxefs_dir (grub_device_t device __attribute__ ((unused)),
|
||||
const char *path __attribute__ ((unused)),
|
||||
int (*hook) (const char *filename,
|
||||
const struct grub_dirhook_info *info) UNUSED)
|
||||
const struct grub_dirhook_info *info)
|
||||
__attribute__ ((unused)))
|
||||
{
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
@ -123,6 +191,7 @@ grub_pxefs_open (struct grub_file *file, const char *name)
|
|||
struct grub_pxenv_tftp_open c2;
|
||||
} c;
|
||||
struct grub_pxe_data *data;
|
||||
struct grub_pxe_disk_data *disk_data = file->device->disk->data;
|
||||
grub_file_t file_int, bufio;
|
||||
|
||||
if (curr_file != 0)
|
||||
|
@ -131,8 +200,8 @@ grub_pxefs_open (struct grub_file *file, const char *name)
|
|||
curr_file = 0;
|
||||
}
|
||||
|
||||
c.c1.server_ip = grub_pxe_server_ip;
|
||||
c.c1.gateway_ip = grub_pxe_gateway_ip;
|
||||
c.c1.server_ip = disk_data->server_ip;
|
||||
c.c1.gateway_ip = disk_data->gateway_ip;
|
||||
grub_strcpy ((char *)&c.c1.filename[0], name);
|
||||
grub_pxe_call (GRUB_PXENV_TFTP_GET_FSIZE, &c.c1);
|
||||
if (c.c1.status)
|
||||
|
@ -182,6 +251,7 @@ grub_pxefs_read (grub_file_t file, char *buf, grub_size_t len)
|
|||
{
|
||||
struct grub_pxenv_tftp_read c;
|
||||
struct grub_pxe_data *data;
|
||||
struct grub_pxe_disk_data *disk_data = file->device->disk->data;
|
||||
grub_uint32_t pn, r;
|
||||
|
||||
data = file->data;
|
||||
|
@ -201,8 +271,8 @@ grub_pxefs_read (grub_file_t file, char *buf, grub_size_t len)
|
|||
if (curr_file != 0)
|
||||
grub_pxe_call (GRUB_PXENV_TFTP_CLOSE, &o);
|
||||
|
||||
o.server_ip = grub_pxe_server_ip;
|
||||
o.gateway_ip = grub_pxe_gateway_ip;
|
||||
o.server_ip = disk_data->server_ip;
|
||||
o.gateway_ip = disk_data->gateway_ip;
|
||||
grub_strcpy ((char *)&o.filename[0], data->filename);
|
||||
o.tftp_port = grub_cpu_to_be16 (GRUB_PXE_TFTP_PORT);
|
||||
o.packet_size = grub_pxe_blksize;
|
||||
|
@ -270,6 +340,99 @@ static struct grub_fs grub_pxefs_fs =
|
|||
.next = 0
|
||||
};
|
||||
|
||||
static char *
|
||||
grub_env_write_readonly (struct grub_env_var *var __attribute__ ((unused)),
|
||||
const char *val __attribute__ ((unused)))
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
set_mac_env (grub_uint8_t *mac_addr, grub_size_t mac_len)
|
||||
{
|
||||
char buf[(sizeof ("XX:") - 1) * mac_len + 1];
|
||||
char *ptr = buf;
|
||||
unsigned i;
|
||||
|
||||
for (i = 0; i < mac_len; i++)
|
||||
{
|
||||
grub_sprintf (ptr, "%02x:", mac_addr[i] & 0xff);
|
||||
ptr += (sizeof ("XX:") - 1);
|
||||
}
|
||||
if (mac_len)
|
||||
*(ptr - 1) = 0;
|
||||
else
|
||||
buf[0] = 0;
|
||||
|
||||
grub_env_set ("net_pxe_mac", buf);
|
||||
/* XXX: Is it possible to change MAC in PXE? */
|
||||
grub_register_variable_hook ("net_pxe_mac", 0, grub_env_write_readonly);
|
||||
}
|
||||
|
||||
static void
|
||||
set_env_limn_ro (const char *varname, char *value, grub_size_t len)
|
||||
{
|
||||
char c;
|
||||
c = value[len];
|
||||
value[len] = 0;
|
||||
grub_env_set (varname, value);
|
||||
value[len] = c;
|
||||
grub_register_variable_hook (varname, 0, grub_env_write_readonly);
|
||||
}
|
||||
|
||||
static void
|
||||
parse_dhcp_vendor (void *vend, int limit)
|
||||
{
|
||||
grub_uint8_t *ptr, *ptr0;
|
||||
|
||||
ptr = ptr0 = vend;
|
||||
|
||||
if (grub_be_to_cpu32 (*(grub_uint32_t *) ptr) != 0x63825363)
|
||||
return;
|
||||
ptr = ptr + sizeof (grub_uint32_t);
|
||||
while (ptr - ptr0 < limit)
|
||||
{
|
||||
grub_uint8_t tagtype;
|
||||
grub_uint8_t taglength;
|
||||
|
||||
tagtype = *ptr++;
|
||||
|
||||
/* Pad tag. */
|
||||
if (tagtype == 0)
|
||||
continue;
|
||||
|
||||
/* End tag. */
|
||||
if (tagtype == 0xff)
|
||||
return;
|
||||
|
||||
taglength = *ptr++;
|
||||
|
||||
switch (tagtype)
|
||||
{
|
||||
case 12:
|
||||
set_env_limn_ro ("net_pxe_hostname", (char *) ptr, taglength);
|
||||
break;
|
||||
|
||||
case 15:
|
||||
set_env_limn_ro ("net_pxe_domain", (char *) ptr, taglength);
|
||||
break;
|
||||
|
||||
case 17:
|
||||
set_env_limn_ro ("net_pxe_rootpath", (char *) ptr, taglength);
|
||||
break;
|
||||
|
||||
case 18:
|
||||
set_env_limn_ro ("net_pxe_extensionspath", (char *) ptr, taglength);
|
||||
break;
|
||||
|
||||
/* If you need any other options please contact GRUB
|
||||
developpement team. */
|
||||
}
|
||||
|
||||
ptr += taglength;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
grub_pxe_detect (void)
|
||||
{
|
||||
|
@ -291,9 +454,15 @@ grub_pxe_detect (void)
|
|||
bp = LINEAR (ci.buffer);
|
||||
|
||||
grub_pxe_your_ip = bp->your_ip;
|
||||
grub_pxe_server_ip = bp->server_ip;
|
||||
grub_pxe_gateway_ip = bp->gateway_ip;
|
||||
|
||||
grub_pxe_default_server_ip = bp->server_ip;
|
||||
grub_pxe_default_gateway_ip = bp->gateway_ip;
|
||||
set_mac_env (bp->mac_addr, bp->hw_len < sizeof (bp->mac_addr) ? bp->hw_len
|
||||
: sizeof (bp->mac_addr));
|
||||
set_env_limn_ro ("net_pxe_boot_file", (char *) bp->boot_file,
|
||||
sizeof (bp->boot_file));
|
||||
set_env_limn_ro ("net_pxe_dhcp_server_name", (char *) bp->server_name,
|
||||
sizeof (bp->server_name));
|
||||
parse_dhcp_vendor (&bp->vendor, sizeof (bp->vendor));
|
||||
grub_pxe_pxenv = pxenv;
|
||||
}
|
||||
|
||||
|
@ -309,11 +478,110 @@ grub_pxe_unload (void)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
set_ip_env (char *varname, grub_uint32_t ip)
|
||||
{
|
||||
char buf[sizeof ("XXX.XXX.XXX.XXX")];
|
||||
|
||||
grub_sprintf (buf, "%d.%d.%d.%d", (ip & 0xff),
|
||||
(ip >> 8) & 0xff, (ip >> 16) & 0xff, (ip >> 24) & 0xff);
|
||||
grub_env_set (varname, buf);
|
||||
}
|
||||
|
||||
static char *
|
||||
write_ip_env (grub_uint32_t *ip, const char *val)
|
||||
{
|
||||
char *buf;
|
||||
grub_err_t err;
|
||||
grub_uint32_t newip;
|
||||
|
||||
err = parse_ip (val, &newip, 0);
|
||||
if (err)
|
||||
return 0;
|
||||
|
||||
/* Normalize the IP. */
|
||||
buf = grub_malloc (sizeof ("XXX.XXX.XXX.XXX"));
|
||||
if (!buf)
|
||||
return 0;
|
||||
|
||||
*ip = newip;
|
||||
|
||||
grub_sprintf (buf, "%d.%d.%d.%d", (newip & 0xff), (newip >> 8) & 0xff,
|
||||
(newip >> 16) & 0xff, (newip >> 24) & 0xff);
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
static char *
|
||||
grub_env_write_pxe_default_server (struct grub_env_var *var
|
||||
__attribute__ ((unused)),
|
||||
const char *val)
|
||||
{
|
||||
return write_ip_env (&grub_pxe_default_server_ip, val);
|
||||
}
|
||||
|
||||
static char *
|
||||
grub_env_write_pxe_default_gateway (struct grub_env_var *var
|
||||
__attribute__ ((unused)),
|
||||
const char *val)
|
||||
{
|
||||
return write_ip_env (&grub_pxe_default_gateway_ip, val);
|
||||
}
|
||||
|
||||
static char *
|
||||
grub_env_write_pxe_blocksize (struct grub_env_var *var __attribute__ ((unused)),
|
||||
const char *val)
|
||||
{
|
||||
unsigned size;
|
||||
char *buf;
|
||||
|
||||
size = grub_strtoul (val, 0, 0);
|
||||
if (grub_errno)
|
||||
return 0;
|
||||
|
||||
if (size < GRUB_PXE_MIN_BLKSIZE)
|
||||
size = GRUB_PXE_MIN_BLKSIZE;
|
||||
else if (size > GRUB_PXE_MAX_BLKSIZE)
|
||||
size = GRUB_PXE_MAX_BLKSIZE;
|
||||
|
||||
buf = grub_malloc (sizeof ("XXXXXX XXXXXX"));
|
||||
if (!buf)
|
||||
return 0;
|
||||
|
||||
grub_sprintf (buf, "%d", size);
|
||||
grub_pxe_blksize = size;
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
||||
GRUB_MOD_INIT(pxe)
|
||||
{
|
||||
grub_pxe_detect ();
|
||||
if (grub_pxe_pxenv)
|
||||
{
|
||||
char *buf;
|
||||
|
||||
buf = grub_malloc (sizeof ("XXXXXX XXXXXX"));
|
||||
if (buf)
|
||||
{
|
||||
grub_sprintf (buf, "%d", grub_pxe_blksize);
|
||||
grub_env_set ("net_pxe_blksize", buf);
|
||||
}
|
||||
|
||||
set_ip_env ("pxe_default_server", grub_pxe_default_server_ip);
|
||||
set_ip_env ("pxe_default_gateway", grub_pxe_default_gateway_ip);
|
||||
set_ip_env ("net_pxe_ip", grub_pxe_your_ip);
|
||||
grub_register_variable_hook ("net_pxe_default_server", 0,
|
||||
grub_env_write_pxe_default_server);
|
||||
grub_register_variable_hook ("net_pxe_default_gateway", 0,
|
||||
grub_env_write_pxe_default_gateway);
|
||||
|
||||
/* XXX: Is it possible to change IP in PXE? */
|
||||
grub_register_variable_hook ("net_pxe_ip", 0,
|
||||
grub_env_write_readonly);
|
||||
grub_register_variable_hook ("net_pxe_blksize", 0,
|
||||
grub_env_write_pxe_blocksize);
|
||||
grub_disk_dev_register (&grub_pxe_dev);
|
||||
grub_fs_register (&grub_pxefs_fs);
|
||||
}
|
||||
|
|
11
fs/iso9660.c
11
fs/iso9660.c
|
@ -26,6 +26,7 @@
|
|||
#include <grub/dl.h>
|
||||
#include <grub/types.h>
|
||||
#include <grub/fshelp.h>
|
||||
#include <grub/charset.h>
|
||||
|
||||
#define GRUB_ISO9660_FSTYPE_DIR 0040000
|
||||
#define GRUB_ISO9660_FSTYPE_REG 0100000
|
||||
|
@ -279,13 +280,13 @@ grub_iso9660_mount (grub_disk_t disk)
|
|||
sizeof (struct grub_iso9660_primary_voldesc),
|
||||
(char *) &voldesc))
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_FS, "not a iso9660 filesystem");
|
||||
grub_error (GRUB_ERR_BAD_FS, "not a ISO9660 filesystem");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (grub_strncmp ((char *) voldesc.voldesc.magic, "CD001", 5) != 0)
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_FS, "not a iso9660 filesystem");
|
||||
grub_error (GRUB_ERR_BAD_FS, "not a ISO9660 filesystem");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
@ -314,7 +315,7 @@ grub_iso9660_mount (grub_disk_t disk)
|
|||
<< GRUB_ISO9660_LOG2_BLKSZ), 0,
|
||||
sizeof (rootdir), (char *) &rootdir))
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_FS, "not a iso9660 filesystem");
|
||||
grub_error (GRUB_ERR_BAD_FS, "not a ISO9660 filesystem");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
@ -330,7 +331,7 @@ grub_iso9660_mount (grub_disk_t disk)
|
|||
<< GRUB_ISO9660_LOG2_BLKSZ), sua_pos,
|
||||
sua_size, sua))
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_FS, "not a iso9660 filesystem");
|
||||
grub_error (GRUB_ERR_BAD_FS, "not a ISO9660 filesystem");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
@ -831,7 +832,7 @@ grub_iso9660_uuid (grub_device_t device, char **uuid)
|
|||
&& ! data->voldesc.modified.second[0] && ! data->voldesc.modified.second[1]
|
||||
&& ! data->voldesc.modified.hundredth[0] && ! data->voldesc.modified.hundredth[1])
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_NUMBER, "No creation date in filesystem to generate UUID.");
|
||||
grub_error (GRUB_ERR_BAD_NUMBER, "no creation date in filesystem to generate UUID");
|
||||
*uuid = NULL;
|
||||
}
|
||||
else
|
||||
|
|
7
fs/jfs.c
7
fs/jfs.c
|
@ -24,6 +24,7 @@
|
|||
#include <grub/disk.h>
|
||||
#include <grub/dl.h>
|
||||
#include <grub/types.h>
|
||||
#include <grub/charset.h>
|
||||
|
||||
#define GRUB_JFS_MAX_SYMLNK_CNT 8
|
||||
#define GRUB_JFS_FILETYPE_MASK 0170000
|
||||
|
@ -343,7 +344,7 @@ grub_jfs_mount (grub_disk_t disk)
|
|||
|
||||
if (grub_strncmp ((char *) (data->sblock.magic), "JFS1", 4))
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_FS, "not a jfs filesystem");
|
||||
grub_error (GRUB_ERR_BAD_FS, "not a JFS filesystem");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
@ -362,7 +363,7 @@ grub_jfs_mount (grub_disk_t disk)
|
|||
grub_free (data);
|
||||
|
||||
if (grub_errno == GRUB_ERR_OUT_OF_RANGE)
|
||||
grub_error (GRUB_ERR_BAD_FS, "not a jfs filesystem");
|
||||
grub_error (GRUB_ERR_BAD_FS, "not a JFS filesystem");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -714,7 +715,7 @@ grub_jfs_lookup_symlink (struct grub_jfs_data *data, int ino)
|
|||
|
||||
grub_jfs_find_file (data, symlink);
|
||||
if (grub_errno)
|
||||
grub_error (grub_errno, "Can not follow symlink `%s'.", symlink);
|
||||
grub_error (grub_errno, "cannot follow symlink `%s'", symlink);
|
||||
|
||||
return grub_errno;
|
||||
}
|
||||
|
|
|
@ -311,7 +311,7 @@ grub_minix_lookup_symlink (struct grub_minix_data *data, int ino)
|
|||
|
||||
grub_minix_find_file (data, symlink);
|
||||
if (grub_errno)
|
||||
grub_error (grub_errno, "Can not follow symlink `%s'.", symlink);
|
||||
grub_error (grub_errno, "cannot follow symlink `%s'", symlink);
|
||||
|
||||
return grub_errno;
|
||||
}
|
||||
|
|
25
fs/ntfs.c
25
fs/ntfs.c
|
@ -24,6 +24,7 @@
|
|||
#include <grub/dl.h>
|
||||
#include <grub/fshelp.h>
|
||||
#include <grub/ntfs.h>
|
||||
#include <grub/charset.h>
|
||||
|
||||
static grub_dl_t my_mod;
|
||||
|
||||
|
@ -41,7 +42,7 @@ fixup (struct grub_ntfs_data *data, char *buf, int len, char *magic)
|
|||
|
||||
ss = u16at (buf, 6) - 1;
|
||||
if (ss * (int) data->blocksize != len * GRUB_DISK_SECTOR_SIZE)
|
||||
return grub_error (GRUB_ERR_BAD_FS, "Size not match",
|
||||
return grub_error (GRUB_ERR_BAD_FS, "size not match",
|
||||
ss * (int) data->blocksize,
|
||||
len * GRUB_DISK_SECTOR_SIZE);
|
||||
pu = buf + u16at (buf, 4);
|
||||
|
@ -52,7 +53,7 @@ fixup (struct grub_ntfs_data *data, char *buf, int len, char *magic)
|
|||
buf += data->blocksize;
|
||||
pu += 2;
|
||||
if (u16at (buf, 0) != us)
|
||||
return grub_error (GRUB_ERR_BAD_FS, "Fixup signature not match");
|
||||
return grub_error (GRUB_ERR_BAD_FS, "fixup signature not match");
|
||||
v16at (buf, 0) = v16at (pu, 0);
|
||||
ss--;
|
||||
}
|
||||
|
@ -146,7 +147,7 @@ find_attr (struct grub_ntfs_attr *at, unsigned char attr)
|
|||
new_pos += u16at (new_pos, 4);
|
||||
}
|
||||
grub_error (GRUB_ERR_BAD_FS,
|
||||
"Can\'t find 0x%X in attribute list",
|
||||
"can\'t find 0x%X in attribute list",
|
||||
(unsigned char) *at->attr_cur);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -185,7 +186,7 @@ find_attr (struct grub_ntfs_attr *at, unsigned char attr)
|
|||
if (read_data (at, pa, at->edat_buf, 0, n, 0, 0))
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_FS,
|
||||
"Fail to read non-resident attribute list");
|
||||
"fail to read non-resident attribute list");
|
||||
return NULL;
|
||||
}
|
||||
at->attr_nxt = at->edat_buf;
|
||||
|
@ -314,7 +315,7 @@ retry:
|
|||
goto retry;
|
||||
}
|
||||
}
|
||||
return grub_error (GRUB_ERR_BAD_FS, "Run list overflown");
|
||||
return grub_error (GRUB_ERR_BAD_FS, "run list overflown");
|
||||
}
|
||||
run = read_run_data (run + 1, c1, &val, 0); /* length of current VCN */
|
||||
ctx->curr_vcn = ctx->next_vcn;
|
||||
|
@ -368,7 +369,7 @@ read_data (struct grub_ntfs_attr *at, char *pa, char *dest,
|
|||
if (pa[8] == 0)
|
||||
{
|
||||
if (ofs + len > u32at (pa, 0x10))
|
||||
return grub_error (GRUB_ERR_BAD_FS, "Read out of range");
|
||||
return grub_error (GRUB_ERR_BAD_FS, "read out of range");
|
||||
grub_memcpy (dest, pa + u32at (pa, 0x14) + ofs, len);
|
||||
return 0;
|
||||
}
|
||||
|
@ -382,7 +383,7 @@ read_data (struct grub_ntfs_attr *at, char *pa, char *dest,
|
|||
if (ctx->flags & RF_COMP)
|
||||
{
|
||||
if (!cached)
|
||||
return grub_error (GRUB_ERR_BAD_FS, "Attribute can\'t be compressed");
|
||||
return grub_error (GRUB_ERR_BAD_FS, "attribute can\'t be compressed");
|
||||
|
||||
if (at->sbuf)
|
||||
{
|
||||
|
@ -501,7 +502,7 @@ read_attr (struct grub_ntfs_attr *at, char *dest, grub_disk_addr_t ofs,
|
|||
else
|
||||
ret =
|
||||
(grub_errno) ? grub_errno : grub_error (GRUB_ERR_BAD_FS,
|
||||
"Attribute not found");
|
||||
"attribute not found");
|
||||
at->attr_cur = save_cur;
|
||||
return ret;
|
||||
}
|
||||
|
@ -512,7 +513,7 @@ read_mft (struct grub_ntfs_data *data, char *buf, grub_uint32_t mftno)
|
|||
if (read_attr
|
||||
(&data->mmft.attr, buf, mftno * ((grub_disk_addr_t) data->mft_size << BLK_SHR),
|
||||
data->mft_size << BLK_SHR, 0, 0))
|
||||
return grub_error (GRUB_ERR_BAD_FS, "Read MFT 0x%X fails", mftno);
|
||||
return grub_error (GRUB_ERR_BAD_FS, "read MFT 0x%X fails", mftno);
|
||||
return fixup (data, buf, data->mft_size, "FILE");
|
||||
}
|
||||
|
||||
|
@ -540,7 +541,7 @@ init_file (struct grub_ntfs_file *mft, grub_uint32_t mftno)
|
|||
|
||||
pa = locate_attr (&mft->attr, mft, AT_DATA);
|
||||
if (pa == NULL)
|
||||
return grub_error (GRUB_ERR_BAD_FS, "No $DATA in MFT 0x%X", mftno);
|
||||
return grub_error (GRUB_ERR_BAD_FS, "no $DATA in MFT 0x%X", mftno);
|
||||
|
||||
if (!pa[8])
|
||||
mft->size = u32at (pa, 0x10);
|
||||
|
@ -663,7 +664,7 @@ grub_ntfs_iterate_dir (grub_fshelp_node_t dir,
|
|||
{
|
||||
if ((cur_pos = find_attr (at, AT_INDEX_ROOT)) == NULL)
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_FS, "No $INDEX_ROOT");
|
||||
grub_error (GRUB_ERR_BAD_FS, "no $INDEX_ROOT");
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
@ -716,7 +717,7 @@ grub_ntfs_iterate_dir (grub_fshelp_node_t dir,
|
|||
if (read_data (at, cur_pos, bmp, 0, bitmap_len, 0, 0))
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_FS,
|
||||
"Fails to read non-resident $BITMAP");
|
||||
"fails to read non-resident $BITMAP");
|
||||
goto done;
|
||||
}
|
||||
bitmap_len = u32at (cur_pos, 0x30);
|
||||
|
|
|
@ -28,7 +28,7 @@ static grub_err_t
|
|||
decomp_nextvcn (struct grub_ntfs_comp *cc)
|
||||
{
|
||||
if (cc->comp_head >= cc->comp_tail)
|
||||
return grub_error (GRUB_ERR_BAD_FS, "Compression block overflown");
|
||||
return grub_error (GRUB_ERR_BAD_FS, "compression block overflown");
|
||||
if (grub_disk_read
|
||||
(cc->disk,
|
||||
(cc->comp_table[cc->comp_head][1] -
|
||||
|
@ -87,7 +87,7 @@ decomp_block (struct grub_ntfs_comp *cc, char *dest)
|
|||
{
|
||||
if (copied > COM_LEN)
|
||||
return grub_error (GRUB_ERR_BAD_FS,
|
||||
"Compression block too large");
|
||||
"compression block too large");
|
||||
|
||||
if (!bits)
|
||||
{
|
||||
|
@ -112,7 +112,7 @@ decomp_block (struct grub_ntfs_comp *cc, char *dest)
|
|||
|
||||
if (!copied)
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_FS, "Context window empty");
|
||||
grub_error (GRUB_ERR_BAD_FS, "nontext window empty");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -150,7 +150,7 @@ decomp_block (struct grub_ntfs_comp *cc, char *dest)
|
|||
{
|
||||
if (cnt != COM_LEN)
|
||||
return grub_error (GRUB_ERR_BAD_FS,
|
||||
"Invalid compression block size");
|
||||
"invalid compression block size");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -187,7 +187,7 @@ read_block (struct grub_ntfs_rlst *ctx, char *buf, int num)
|
|||
{
|
||||
|
||||
if (ctx->comp.comp_head != ctx->comp.comp_tail)
|
||||
return grub_error (GRUB_ERR_BAD_FS, "Invalid compression block");
|
||||
return grub_error (GRUB_ERR_BAD_FS, "invalid compression block");
|
||||
ctx->comp.comp_head = ctx->comp.comp_tail = 0;
|
||||
ctx->comp.cbuf_vcn = ctx->target_vcn;
|
||||
ctx->comp.cbuf_ofs = (ctx->comp.spc << BLK_SHR);
|
||||
|
|
|
@ -691,7 +691,7 @@ grub_reiserfs_mount (grub_disk_t disk)
|
|||
if (grub_memcmp (data->superblock.magic_string,
|
||||
REISERFS_MAGIC_STRING, sizeof (REISERFS_MAGIC_STRING) - 1))
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_FS, "not a reiserfs filesystem");
|
||||
grub_error (GRUB_ERR_BAD_FS, "not a ReiserFS filesystem");
|
||||
goto fail;
|
||||
}
|
||||
data->disk = disk;
|
||||
|
@ -700,7 +700,7 @@ grub_reiserfs_mount (grub_disk_t disk)
|
|||
fail:
|
||||
/* Disk is too small to contain a ReiserFS. */
|
||||
if (grub_errno == GRUB_ERR_OUT_OF_RANGE)
|
||||
grub_error (GRUB_ERR_BAD_FS, "not a reiserfs filesystem");
|
||||
grub_error (GRUB_ERR_BAD_FS, "not a ReiserFS filesystem");
|
||||
|
||||
grub_free (data);
|
||||
return 0;
|
||||
|
@ -998,7 +998,7 @@ grub_reiserfs_open (struct grub_file *file, const char *name)
|
|||
goto fail;
|
||||
if (root.block_number == 0)
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_FS, "Unable to find root item");
|
||||
grub_error (GRUB_ERR_BAD_FS, "unable to find root item");
|
||||
goto fail; /* Should never happen since checked at mount. */
|
||||
}
|
||||
grub_fshelp_find_file (name, &root, &found,
|
||||
|
@ -1014,7 +1014,7 @@ grub_reiserfs_open (struct grub_file *file, const char *name)
|
|||
goto fail;
|
||||
if (info.block_number == 0)
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_FS, "Unable to find searched item");
|
||||
grub_error (GRUB_ERR_BAD_FS, "unable to find searched item");
|
||||
goto fail;
|
||||
}
|
||||
entry_version = grub_le_to_cpu16 (info.header.version);
|
||||
|
@ -1289,7 +1289,7 @@ grub_reiserfs_dir (grub_device_t device, const char *path,
|
|||
goto fail;
|
||||
if (root.block_number == 0)
|
||||
{
|
||||
grub_error(GRUB_ERR_BAD_FS, "Root not found");
|
||||
grub_error(GRUB_ERR_BAD_FS, "root not found");
|
||||
goto fail;
|
||||
}
|
||||
grub_fshelp_find_file (path, &root, &found, grub_reiserfs_iterate_dir,
|
||||
|
|
4
fs/sfs.c
4
fs/sfs.c
|
@ -279,7 +279,7 @@ grub_sfs_mount (grub_disk_t disk)
|
|||
/* Make sure this is a sfs filesystem. */
|
||||
if (grub_strncmp ((char *) (data->rblock.header.magic), "SFS", 4))
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_FS, "not a sfs filesystem");
|
||||
grub_error (GRUB_ERR_BAD_FS, "not a SFS filesystem");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
@ -307,7 +307,7 @@ grub_sfs_mount (grub_disk_t disk)
|
|||
|
||||
fail:
|
||||
if (grub_errno == GRUB_ERR_OUT_OF_RANGE)
|
||||
grub_error (GRUB_ERR_BAD_FS, "not an sfs filesystem");
|
||||
grub_error (GRUB_ERR_BAD_FS, "not an SFS filesystem");
|
||||
|
||||
grub_free (data);
|
||||
grub_free (rootobjc_data);
|
||||
|
|
16
fs/udf.c
16
fs/udf.c
|
@ -525,7 +525,7 @@ grub_udf_mount (grub_disk_t disk)
|
|||
if (grub_disk_read (disk, block << GRUB_UDF_LOG2_BLKSZ, 0,
|
||||
sizeof (struct grub_udf_vrs), &vrs))
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_FS, "not an udf filesystem");
|
||||
grub_error (GRUB_ERR_BAD_FS, "not an UDF filesystem");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
@ -539,7 +539,7 @@ grub_udf_mount (grub_disk_t disk)
|
|||
(grub_memcmp (vrs.magic, GRUB_UDF_STD_IDENT_CDW02, 5)) &&
|
||||
(grub_memcmp (vrs.magic, GRUB_UDF_STD_IDENT_TEA01, 5)))
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_FS, "not an udf filesystem");
|
||||
grub_error (GRUB_ERR_BAD_FS, "not an UDF filesystem");
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
|
@ -552,7 +552,7 @@ grub_udf_mount (grub_disk_t disk)
|
|||
if (grub_disk_read (disk, *sblklist << GRUB_UDF_LOG2_BLKSZ, 0,
|
||||
sizeof (struct grub_udf_avdp), &avdp))
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_FS, "not an udf filesystem");
|
||||
grub_error (GRUB_ERR_BAD_FS, "not an UDF filesystem");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
@ -565,7 +565,7 @@ grub_udf_mount (grub_disk_t disk)
|
|||
sblklist++;
|
||||
if (*sblklist == 0)
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_FS, "not an udf filesystem");
|
||||
grub_error (GRUB_ERR_BAD_FS, "not an UDF filesystem");
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
|
@ -579,7 +579,7 @@ grub_udf_mount (grub_disk_t disk)
|
|||
if (grub_disk_read (disk, block << GRUB_UDF_LOG2_BLKSZ, 0,
|
||||
sizeof (struct grub_udf_tag), &tag))
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_FS, "not an udf filesystem");
|
||||
grub_error (GRUB_ERR_BAD_FS, "not an UDF filesystem");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
@ -596,7 +596,7 @@ grub_udf_mount (grub_disk_t disk)
|
|||
sizeof (struct grub_udf_pd),
|
||||
&data->pds[data->npd]))
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_FS, "not an udf filesystem");
|
||||
grub_error (GRUB_ERR_BAD_FS, "not an UDF filesystem");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
@ -612,7 +612,7 @@ grub_udf_mount (grub_disk_t disk)
|
|||
sizeof (struct grub_udf_lvd),
|
||||
&data->lvd))
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_FS, "not an udf filesystem");
|
||||
grub_error (GRUB_ERR_BAD_FS, "not an UDF filesystem");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
@ -675,7 +675,7 @@ grub_udf_mount (grub_disk_t disk)
|
|||
if (grub_disk_read (disk, block << GRUB_UDF_LOG2_BLKSZ, 0,
|
||||
sizeof (struct grub_udf_fileset), &root_fs))
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_FS, "not an udf filesystem");
|
||||
grub_error (GRUB_ERR_BAD_FS, "not an UDF filesystem");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
|
2
fs/ufs.c
2
fs/ufs.c
|
@ -415,7 +415,7 @@ grub_ufs_lookup_symlink (struct grub_ufs_data *data, int ino)
|
|||
|
||||
grub_ufs_find_file (data, symlink);
|
||||
if (grub_errno)
|
||||
grub_error (grub_errno, "Can not follow symlink `%s'.", symlink);
|
||||
grub_error (grub_errno, "cannot follow symlink `%s'", symlink);
|
||||
|
||||
return grub_errno;
|
||||
}
|
||||
|
|
12
fs/xfs.c
12
fs/xfs.c
|
@ -222,7 +222,7 @@ grub_xfs_read_inode (struct grub_xfs_data *data, grub_uint64_t ino,
|
|||
return grub_errno;
|
||||
|
||||
if (grub_strncmp ((char *) inode->magic, "IN", 2))
|
||||
return grub_error (GRUB_ERR_BAD_FS, "not a correct XFS inode.\n");
|
||||
return grub_error (GRUB_ERR_BAD_FS, "not a correct XFS inode");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -273,7 +273,7 @@ grub_xfs_read_block (grub_fshelp_node_t node, grub_disk_addr_t fileblock)
|
|||
if (grub_strncmp ((char *) leaf->magic, "BMAP", 4))
|
||||
{
|
||||
grub_free (leaf);
|
||||
grub_error (GRUB_ERR_BAD_FS, "not a correct XFS BMAP node.\n");
|
||||
grub_error (GRUB_ERR_BAD_FS, "not a correct XFS BMAP node");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -290,7 +290,7 @@ grub_xfs_read_block (grub_fshelp_node_t node, grub_disk_addr_t fileblock)
|
|||
else
|
||||
{
|
||||
grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
|
||||
"xfs does not support inode format %d yet",
|
||||
"XFS does not support inode format %d yet",
|
||||
node->inode.format);
|
||||
return 0;
|
||||
}
|
||||
|
@ -567,7 +567,7 @@ grub_xfs_iterate_dir (grub_fshelp_node_t dir,
|
|||
|
||||
default:
|
||||
grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
|
||||
"xfs does not support inode format %d yet",
|
||||
"XFS does not support inode format %d yet",
|
||||
diro->inode.format);
|
||||
}
|
||||
return 0;
|
||||
|
@ -590,7 +590,7 @@ grub_xfs_mount (grub_disk_t disk)
|
|||
|
||||
if (grub_strncmp ((char *) (data->sblock.magic), "XFSB", 4))
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_FS, "not a xfs filesystem");
|
||||
grub_error (GRUB_ERR_BAD_FS, "not a XFS filesystem");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
@ -617,7 +617,7 @@ grub_xfs_mount (grub_disk_t disk)
|
|||
fail:
|
||||
|
||||
if (grub_errno == GRUB_ERR_OUT_OF_RANGE)
|
||||
grub_error (GRUB_ERR_BAD_FS, "not an xfs filesystem");
|
||||
grub_error (GRUB_ERR_BAD_FS, "not an XFS filesystem");
|
||||
|
||||
grub_free (data);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue