From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MLzRf-0007WP-01 for mharc-grub-devel@gnu.org; Wed, 01 Jul 2009 09:01:51 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MLzRd-0007V6-1L for grub-devel@gnu.org; Wed, 01 Jul 2009 09:01:49 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MLzRV-0007PX-SI for grub-devel@gnu.org; Wed, 01 Jul 2009 09:01:47 -0400 Received: from [199.232.76.173] (port=33530 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MLzRV-0007Ov-Bh for grub-devel@gnu.org; Wed, 01 Jul 2009 09:01:41 -0400 Received: from aybabtu.com ([69.60.117.155]:49287) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MLzRU-0005No-K9 for grub-devel@gnu.org; Wed, 01 Jul 2009 09:01:40 -0400 Received: from [192.168.10.10] (helo=thorin) by aybabtu.com with esmtp (Exim 4.69) (envelope-from ) id 1MLyNf-0007MD-Fg for grub-devel@gnu.org; Wed, 01 Jul 2009 13:53:40 +0200 Received: from rmh by thorin with local (Exim 4.69) (envelope-from ) id 1MLzRR-0004eM-Kr for grub-devel@gnu.org; Wed, 01 Jul 2009 15:01:37 +0200 Date: Wed, 1 Jul 2009 15:01:37 +0200 From: Robert Millan To: grub-devel@gnu.org Message-ID: <20090701130137.GC17770@thorin> References: <20090629131902.GA11839@thorin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090629131902.GA11839@thorin> Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.18 (2008-05-17) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) Subject: Re: [PATCH] get rid of util/$(target_cpu)/$(platform)/misc.c X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2009 13:01:50 -0000 Committed. On Mon, Jun 29, 2009 at 03:19:02PM +0200, Robert Millan wrote: > > This patch gets rid of util/$(target_cpu)/$(platform)/misc.c by integrating > them into util/misc.c. > > It paves the way for unification of grub-emu. > > -- > Robert Millan > > The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and > how) you may access your data; but nobody's threatening your freedom: we > still allow you to remove your data and not access it at all." > 2009-06-29 Robert Millan > > * util/misc.c: Include `' and `'. > (grub_reboot, grub_halt): New functions. > > * util/i386/pc/misc.c: Delete. Update all users. > * util/sparc64/ieee1275/misc.c: Likewise. > * util/powerpc/ieee1275/misc.c: Likewise. > > Index: conf/i386-pc.rmk > =================================================================== > --- conf/i386-pc.rmk (revision 2371) > +++ conf/i386-pc.rmk (working copy) > @@ -158,7 +158,6 @@ > \ > util/console.c util/hostfs.c util/grub-emu.c util/misc.c \ > util/hostdisk.c util/getroot.c \ > - util/i386/pc/misc.c \ > \ > disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \ > disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c \ > Index: conf/i386-efi.rmk > =================================================================== > --- conf/i386-efi.rmk (revision 2371) > +++ conf/i386-efi.rmk (working copy) > @@ -65,7 +65,6 @@ > partmap/acorn.c partmap/gpt.c \ > util/console.c util/hostfs.c util/grub-emu.c util/misc.c \ > util/hostdisk.c util/getroot.c \ > - util/i386/pc/misc.c \ > \ > disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \ > disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c \ > Index: conf/i386-ieee1275.rmk > =================================================================== > --- conf/i386-ieee1275.rmk (revision 2371) > +++ conf/i386-ieee1275.rmk (working copy) > @@ -92,7 +92,6 @@ > partmap/acorn.c partmap/gpt.c \ > util/console.c util/hostfs.c util/grub-emu.c util/misc.c \ > util/hostdisk.c util/getroot.c \ > - util/i386/pc/misc.c \ > \ > disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \ > disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c \ > Index: conf/x86_64-efi.rmk > =================================================================== > --- conf/x86_64-efi.rmk (revision 2371) > +++ conf/x86_64-efi.rmk (working copy) > @@ -62,7 +62,6 @@ > partmap/acorn.c partmap/gpt.c \ > util/console.c util/hostfs.c util/grub-emu.c util/misc.c \ > util/hostdisk.c util/getroot.c \ > - util/i386/pc/misc.c \ > \ > disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \ > disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c \ > Index: conf/powerpc-ieee1275.rmk > =================================================================== > --- conf/powerpc-ieee1275.rmk (revision 2371) > +++ conf/powerpc-ieee1275.rmk (working copy) > @@ -73,7 +73,6 @@ > partmap/acorn.c \ > util/console.c util/hostfs.c util/grub-emu.c util/misc.c \ > util/hostdisk.c util/getroot.c \ > - util/powerpc/ieee1275/misc.c \ > \ > disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \ > disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c \ > Index: conf/i386-coreboot.rmk > =================================================================== > --- conf/i386-coreboot.rmk (revision 2371) > +++ conf/i386-coreboot.rmk (working copy) > @@ -138,7 +138,6 @@ > partmap/acorn.c partmap/gpt.c \ > util/console.c util/hostfs.c util/grub-emu.c util/misc.c \ > util/hostdisk.c util/getroot.c \ > - util/i386/pc/misc.c \ > \ > disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \ > disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c \ > Index: conf/sparc64-ieee1275.rmk > =================================================================== > --- conf/sparc64-ieee1275.rmk (revision 2371) > +++ conf/sparc64-ieee1275.rmk (working copy) > @@ -129,7 +129,6 @@ > partmap/acorn.c \ > util/console.c util/hostfs.c util/grub-emu.c util/misc.c \ > util/hostdisk.c util/getroot.c \ > - util/sparc64/ieee1275/misc.c \ > \ > disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \ > disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c \ > Index: util/powerpc/ieee1275/misc.c > =================================================================== > --- util/powerpc/ieee1275/misc.c (revision 2371) > +++ util/powerpc/ieee1275/misc.c (working copy) > @@ -1,33 +0,0 @@ > -/* > - * GRUB -- GRand Unified Bootloader > - * Copyright (C) 2005,2007 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 . > - */ > - > -#include > - > -#include > - > -void > -grub_reboot (void) > -{ > - longjmp (main_env, 1); > -} > - > -void > -grub_halt (void) > -{ > - grub_reboot (); > -} > Index: util/sparc64/ieee1275/misc.c > =================================================================== > --- util/sparc64/ieee1275/misc.c (revision 2371) > +++ util/sparc64/ieee1275/misc.c (working copy) > @@ -1,33 +0,0 @@ > -/* > - * GRUB -- GRand Unified Bootloader > - * Copyright (C) 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 > - * 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 . > - */ > - > -#include > - > -#include > - > -void > -grub_reboot (void) > -{ > - longjmp (main_env, 1); > -} > - > -void > -grub_halt (void) > -{ > - grub_reboot (); > -} > Index: util/i386/pc/misc.c > =================================================================== > --- util/i386/pc/misc.c (revision 2371) > +++ util/i386/pc/misc.c (working copy) > @@ -1,33 +0,0 @@ > -/* > - * GRUB -- GRand Unified Bootloader > - * Copyright (C) 2005,2007 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 . > - */ > - > -#include > - > -#include > - > -void > -grub_reboot (void) > -{ > - longjmp (main_env, 1); > -} > - > -void > -grub_halt (int no_apm __attribute__ ((unused))) > -{ > - grub_reboot (); > -} > Index: util/misc.c > =================================================================== > --- util/misc.c (revision 2371) > +++ util/misc.c (working copy) > @@ -18,6 +18,7 @@ > > #include > > +#include > #include > #include > #include > @@ -36,6 +37,7 @@ > #include > #include > #include > +#include > > /* Include malloc.h, only if memalign is available. It is known that > memalign is declared in malloc.h in all systems, if present. */ > @@ -436,4 +438,20 @@ > return size; > } > > +#endif /* __MINGW32__ */ > + > +void > +grub_reboot (void) > +{ > + longjmp (main_env, 1); > +} > + > +void > +grub_halt ( > +#ifdef GRUB_MACHINE_PCBIOS > + int no_apm __attribute__ ((unused)) > #endif > + ) > +{ > + grub_reboot (); > +} > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all."