From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N0XWj-0005ai-7Z for qemu-devel@nongnu.org; Wed, 21 Oct 2009 05:30:41 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N0XWe-0005Z3-Fo for qemu-devel@nongnu.org; Wed, 21 Oct 2009 05:30:40 -0400 Received: from [199.232.76.173] (port=34379 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N0XWe-0005Yy-C5 for qemu-devel@nongnu.org; Wed, 21 Oct 2009 05:30:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37833) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N0XWd-0001g5-T7 for qemu-devel@nongnu.org; Wed, 21 Oct 2009 05:30:36 -0400 Message-ID: <4ADED478.5090108@redhat.com> Date: Wed, 21 Oct 2009 11:29:28 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <1255268921-5403-1-git-send-email-adam@os.inf.tu-dresden.de> <1255268921-5403-2-git-send-email-adam@os.inf.tu-dresden.de> <4AD3085A.1050906@redhat.com> <20091014161114.GE25818@os.inf.tu-dresden.de> <4ADC2394.5050403@redhat.com> <20091020182251.GD8648@os.inf.tu-dresden.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 2/2] multiboot: Limit number of multiboot modules List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: qemu-devel@nongnu.org Am 21.10.2009 01:05, schrieb Juan Quintela: > Adam Lackorzynski wrote: > > Hi > >> +enum { >> + /* Multiboot info */ >> + MBI_FLAGS = 0, >> + MBI_MEM_LOWER = 4, >> + MBI_MEM_UPPER = 8, >> + MBI_BOOT_DEVICE = 12, >> + MBI_CMDLINE = 16, >> + MBI_MODS_COUNT = 20, >> + MBI_MODS_ADDR = 24, >> + MBI_MMAP_ADDR = 48, >> + >> + MBI_SIZE = 88, >> + >> + /* Multiboot modules */ >> + MB_MOD_START = 0, >> + MB_MOD_END = 4, >> + MB_MOD_CMDLINE = 8, >> + >> + MB_MOD_SIZE = 16, >> + >> + /* Region offsets */ >> + ADDR_E820_MAP = MULTIBOOT_STRUCT_ADDR + 0, >> + ADDR_MBI = ADDR_E820_MAP + 0x500, >> + >> + /* Multiboot flags */ >> + MULTIBOOT_FLAGS_MEMORY = 1 << 0, >> + MULTIBOOT_FLAGS_BOOT_DEVICE = 1 << 1, >> + MULTIBOOT_FLAGS_CMDLINE = 1 << 2, >> + MULTIBOOT_FLAGS_MODULES = 1 << 3, >> + MULTIBOOT_FLAGS_MMAP = 1 << 6, >> +}; > > Why do you use a single enum, without name, and repeating the values? > I think that using more than one enum is better here. Right, this looks a bit strange even though it's correct. Otherwise the new patch looks okay and I'd suggest to submit it for inclusion. Kevin