On Fri, Feb 10, 2012 at 08:56:52PM +0100, Vladimir 'φ-coder/phcoder' Serbinenko wrote: > === modified file 'docs/grub.texi' > --- docs/grub.texi 2012-01-31 21:59:32 +0000 > +++ docs/grub.texi 2012-02-10 17:11:59 +0000 > @@ -20,7 +20,7 @@ > This manual is for GNU GRUB (version @value{VERSION}, > @value{UPDATED}). > > -Copyright @copyright{} 1999,2000,2001,2002,2004,2006,2008,2009,2010 Free > Software Foundation, Inc. > +Copyright @copyright{} > 1999,2000,2001,2002,2004,2006,2008,2009,2010,2011,2012 Free Software > Foundation, Inc. > > @quotation > Permission is granted to copy, distribute and/or modify this document > > === modified file 'gentpl.py' > --- gentpl.py 2011-12-24 14:09:26 +0000 > +++ gentpl.py 2012-02-10 17:10:18 +0000 > @@ -1,4 +1,19 @@ > #! /usr/bin/python > +# GRUB -- GRand Unified Bootloader > +# Copyright (C) 2010,2011 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 > +# the Free Software Foundation, either version 3 of the License, or > +# (at your option) any later version. > +# > +# GRUB is distributed in the hope that it will be useful, > +# but WITHOUT ANY WARRANTY; without even the implied warranty of > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +# GNU General Public License for more details. > +# > +# You should have received a copy of the GNU General Public License > +# along with GRUB. If not, see <http://www.gnu.org/licenses/>. > > # > # This is the python script used to generate Makefile.tpl > > === modified file 'grub-core/disk/diskfilter.c' > --- grub-core/disk/diskfilter.c 2012-02-09 22:43:43 +0000 > +++ grub-core/disk/diskfilter.c 2012-02-10 19:54:58 +0000 > @@ -260,6 +260,24 @@ > return list; > } > > +void > +grub_diskfilter_print_partmap (grub_disk_t disk) > +{ > + struct grub_diskfilter_lv *lv = disk->data; > + struct grub_diskfilter_pv *pv; > + > + if (lv->vg->pvs) > + for (pv = lv->vg->pvs; pv; pv = pv->next) > + { > + grub_size_t s; > + if (!pv->disk) > + grub_util_error (_("Couldn't find physical volume `%s'." > + " Check your device.map"), pv->name); > + for (s = 0; pv->partmaps[s]; s++) > + grub_printf ("%s ", pv->partmaps[s]); > + } > +} > + > static const char * > grub_diskfilter_getname (struct grub_disk *disk) > { > @@ -964,6 +982,19 @@ > pv->part_start = grub_partition_get_start (disk->partition); > pv->part_size = grub_disk_get_size (disk); > > +#ifdef GRUB_UTIL > + { > + grub_size_t s = 1; > + grub_partition_t p; > + for (p = disk->partition; p; p = p->parent) > + s++; > + pv->partmaps = xmalloc (s * sizeof (pv->partmaps[0])); > + s = 0; > + for (p = disk->partition; p; p = p->parent) > + pv->partmaps[s++] = xstrdup (p->partmap->name); > + pv->partmaps[s++] = 0; > + } > +#endif > if (start_sector != (grub_uint64_t)-1) > pv->start_sector = start_sector; > pv->start_sector += pv->part_start; > > === modified file 'include/grub/diskfilter.h' > --- include/grub/diskfilter.h 2012-01-29 13:28:01 +0000 > +++ include/grub/diskfilter.h 2012-02-10 19:53:29 +0000 > @@ -72,6 +72,9 @@ > struct grub_diskfilter_pv *next; > /* Optional. */ > grub_uint8_t *internal_id; > +#ifdef GRUB_UTIL > + char **partmaps; > +#endif > }; > > struct grub_diskfilter_lv { > @@ -186,6 +189,8 @@ > struct grub_diskfilter_pv * > grub_diskfilter_get_pv_from_disk (grub_disk_t disk, > struct grub_diskfilter_vg **vg); > +void > +grub_diskfilter_print_partmap (grub_disk_t disk); > #endif > > #endif /* ! GRUB_RAID_H */ > > === modified file 'util/getroot.c' > --- util/getroot.c 2012-02-10 12:17:12 +0000 > +++ util/getroot.c 2012-02-10 18:48:24 +0000 > @@ -372,7 +372,7 @@ > char *buf = NULL; > size_t len = 0; > char **ret = NULL; > - int entry_len = 0, entry_max = 4; > + grub_size_t entry_len = 0, entry_max = 4; > struct mountinfo_entry *entries; > struct mountinfo_entry parent_entry = { 0, 0, 0, "", "", "", "" }; > int i; > @@ -1991,7 +1991,7 @@ > const grub_partition_t partition) > { > grub_disk_addr_t part_start = 0; > - grub_util_info ("Partition %d starts from %lu", > + grub_util_info ("Partition %d starts from %" PRIuGRUB_UINT64_T, > partition->number, partition->start); > > part_start = grub_partition_get_start (partition); > @@ -2022,7 +2022,7 @@ > return 0; > } > > - grub_util_info ("%s starts from %lu", os_dev, start); > + grub_util_info ("%s starts from %" PRIuGRUB_UINT64_T, os_dev, start); > > if (start == 0 && device_is_wholedisk (os_dev)) > return name; > > === modified file 'util/grub-probe.c' > --- util/grub-probe.c 2012-02-10 11:57:00 +0000 > +++ util/grub-probe.c 2012-02-10 19:56:18 +0000 > @@ -87,6 +87,9 @@ > for (part = disk->partition; part; part = part->parent) > printf ("%s ", part->partmap->name); > > + if (disk->dev->id == GRUB_DISK_DEVICE_DISKFILTER_ID) > + grub_diskfilter_print_partmap (disk); > + > /* In case of LVM/RAID, check the member devices as well. */ > if (disk->dev->memberlist) > { > @@ -304,7 +307,7 @@ > raid_level = probe_raid_level (disk); > if (raid_level >= 0) > { > - printf ("raid "); > + printf ("diskfilter ");
Yep, that one looks good. > if (disk->dev->raidname) > printf ("%s ", disk->dev->raidname (disk)); > } > OK that seems to fix getroot.c and diskfilter.c Now of course there is luks.c: gcc-4.4 -DHAVE_CONFIG_H -I. -I../.. -Wall -W -I./include -DGRUB_UTIL=1 -DGRUB_LIBDIR=\"/usr/lib/grub\" -DLOCALEDIR=\"/usr/share/locale\" -DGRUB_MACHINE_EMU=1 -DGRUB_MACHINE=POWERPC_EMU -DGRUB_TARGET_CPU_POWERPC=1 -DGRUB_FILE=\"grub-core/disk/luks.c\" -I. -I../.. -I. -I../.. -I../../include -I./include -I./grub-core/gnulib -I../../grub-core/gnulib -g -Wall -O2 -Wall -W -Wshadow -Wold-style-declaration -Wold-style-definition -Wpointer-arith -Wmissing-prototypes -Wundef -Wextra -Waddress -Warray-bounds -Wattributes -Wbuiltin-macro-redefined -Wcast-align -Wchar-subscripts -Wclobbered -Wcomment -Wcoverage-mismatch -Wdeprecated -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wempty-body -Wendif-labels -Wfloat-equal -Wformat-contains-nul -Wformat-extra-args -Wformat-security -Wformat-y2k -Wignored-qualifiers -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Winline -Wint-to-pointer-cast -Winvalid-pch -Wunsafe-loop-optimizations -Wlogical-op -Wmain -Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-noreturn -Wmudflap -Wmultichar -Wnonnull -Woverflow -Wpacked-bitfield-compat -Wparentheses -Wpointer-arith -Wpointer-to-int-cast -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstack-protector -Wstrict-aliasing -Wstrict-overflow -Wswitch -Wsync-nand -Wtrigraphs -Wtype-limits -Wundef -Wuninitialized -Wunknown-pragmas -Wunreachable-code -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-result -Wunused-value -Wunused-variable -Wvariadic-macros -Wvolatile-register-var -Wwrite-strings -Wmissing-declarations -Wmissing-parameter-type -Wmissing-prototypes -Wnested-externs -Wstrict-prototypes -Wpointer-sign -Werror -Wno-undef -Wno-sign-compare -Wno-unused -Wno-unused-parameter -Wno-redundant-decls -Wno-unreachable-code -Wno-conversion -Wno-old-style-definition -c -o grub-core/disk/libgrubkern_a-luks.o `test -f 'grub-core/disk/luks.c' || echo '../../'`grub-core/disk/luks.c cc1: warnings being treated as errors ../../grub-core/disk/luks.c: In function 'configure_ciphers': ../../grub-core/disk/luks.c:107: error: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 ../../grub-core/disk/luks.c: In function 'grub_luks_init': ../../include/grub/list.h:40: error: dereferencing pointer 'cr.27' does break strict-aliasing rules ../../include/grub/list.h:37: error: dereferencing pointer 'cr.27' does break strict-aliasing rules ../../include/grub/cryptodisk.h:114: note: initialized from here ../../include/grub/list.h:41: error: dereferencing pointer 'grub_cryptodisk_list.26' does break strict-aliasing rules ../../include/grub/cryptodisk.h:114: note: initialized from here ../../grub-core/disk/luks.c: In function 'grub_mod_init': ../../include/grub/list.h:40: error: dereferencing pointer 'cr.27' does break strict-aliasing rules ../../include/grub/list.h:37: error: dereferencing pointer 'cr.27' does break strict-aliasing rules ../../include/grub/cryptodisk.h:114: note: initialized from here ../../include/grub/list.h:41: error: dereferencing pointer 'grub_cryptodisk_list.26' does break strict-aliasing rules ../../include/grub/cryptodisk.h:114: note: initialized from here ../../grub-core/disk/luks.c: In function 'grub_luks_fini': ../../include/grub/list.h:52: error: dereferencing pointer 'cr.28' does break strict-aliasing rules ../../include/grub/list.h:51: error: dereferencing pointer 'cr.28' does break strict-aliasing rules ../../include/grub/list.h:50: error: dereferencing pointer 'cr.28' does break strict-aliasing rules ../../include/grub/list.h:50: error: dereferencing pointer 'cr.28' does break strict-aliasing rules ../../include/grub/list.h:49: error: dereferencing pointer 'cr.28' does break strict-aliasing rules ../../include/grub/list.h:48: error: dereferencing pointer 'cr.28' does break strict-aliasing rules ../../include/grub/list.h:48: error: dereferencing pointer 'cr.28' does break strict-aliasing rules ../../include/grub/list.h:47: error: dereferencing pointer 'cr.28' does break strict-aliasing rules ../../include/grub/cryptodisk.h:121: note: initialized from here ../../grub-core/disk/luks.c: In function 'grub_mod_fini': ../../include/grub/list.h:52: error: dereferencing pointer 'cr.28' does break strict-aliasing rules ../../include/grub/list.h:51: error: dereferencing pointer 'cr.28' does break strict-aliasing rules ../../include/grub/list.h:50: error: dereferencing pointer 'cr.28' does break strict-aliasing rules ../../include/grub/list.h:50: error: dereferencing pointer 'cr.28' does break strict-aliasing rules ../../include/grub/list.h:49: error: dereferencing pointer 'cr.28' does break strict-aliasing rules ../../include/grub/list.h:48: error: dereferencing pointer 'cr.28' does break strict-aliasing rules ../../include/grub/list.h:48: error: dereferencing pointer 'cr.28' does break strict-aliasing rules ../../include/grub/list.h:47: error: dereferencing pointer 'cr.28' does break strict-aliasing rules ../../include/grub/cryptodisk.h:121: note: initialized from here ../../grub-core/disk/luks.c: In function 'configure_ciphers': ../../grub-core/disk/luks.c:107: error: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 ../../grub-core/disk/luks.c:68: error: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 ../../grub-core/disk/luks.c:107: error: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 -- Len Sorensen _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel