mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-22 23:32:39 +00:00
merge with mainline
This commit is contained in:
commit
64c10cde57
6 files changed
+44
-7
No files matched your search
+4
-4
@@ -338,7 +338,7 @@ find_partition_start (const char *dev)
|
||||
struct hd_geometry hdg;
|
||||
# else /* defined(__NetBSD__) */
|
||||
struct disklabel label;
|
||||
int index;
|
||||
int p_index;
|
||||
# endif /* !defined(__NetBSD__) */
|
||||
|
||||
# ifdef HAVE_DEVICE_MAPPER
|
||||
@@ -435,15 +435,15 @@ devmapper_fail:
|
||||
# if !defined(__NetBSD__)
|
||||
return hdg.start;
|
||||
# else /* defined(__NetBSD__) */
|
||||
index = dev[strlen(dev) - 1] - 'a';
|
||||
p_index = dev[strlen(dev) - 1] - 'a';
|
||||
|
||||
if (index >= label.d_npartitions)
|
||||
if (p_index >= label.d_npartitions)
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_DEVICE,
|
||||
"no disk label entry for `%s'", dev);
|
||||
return 0;
|
||||
}
|
||||
return (grub_disk_addr_t) label.d_partitions[index].p_offset;
|
||||
return (grub_disk_addr_t) label.d_partitions[p_index].p_offset;
|
||||
# endif /* !defined(__NetBSD__) */
|
||||
}
|
||||
#endif /* __linux__ || __CYGWIN__ */
|
||||
|
||||
+2
-1
@@ -185,7 +185,8 @@ canonicalize_file_name (const char *path)
|
||||
char *ret;
|
||||
#ifdef PATH_MAX
|
||||
ret = xmalloc (PATH_MAX);
|
||||
(void) realpath (path, ret);
|
||||
if (!realpath (path, ret))
|
||||
return NULL;
|
||||
#else
|
||||
ret = realpath (path, NULL);
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user