From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Lh611-00065M-9i for mharc-grub-devel@gnu.org; Tue, 10 Mar 2009 13:45:19 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lh60x-00063a-IM for grub-devel@gnu.org; Tue, 10 Mar 2009 13:45:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lh60x-00063J-05 for grub-devel@gnu.org; Tue, 10 Mar 2009 13:45:15 -0400 Received: from [199.232.76.173] (port=50710 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lh60w-00063F-RG for grub-devel@gnu.org; Tue, 10 Mar 2009 13:45:14 -0400 Received: from fg-out-1718.google.com ([72.14.220.158]:5996) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lh60w-0002wZ-CS for grub-devel@gnu.org; Tue, 10 Mar 2009 13:45:14 -0400 Received: by fg-out-1718.google.com with SMTP id l27so976018fgb.30 for ; Tue, 10 Mar 2009 10:45:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type; bh=0lvyPfCpkZojRE7L6FIE4PjIgceuT4WEs6q67Kl6RYk=; b=e3kY/o2I6gX1ucCxD/xlAonoAX5O7Ba1kQJUJzK5gHng4vHvtkD7gYl3EDt/GCXoQa M287ucizda2w8bXms/lHmI3T9DBlHJ7vfdkw9XHTXYUUbbzZ2mi2XQcPTJFxMrSHt+LQ 7mWL3Tik7zHSrQ3ORAHVQLHSMWhgqPDgXB6jA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; b=OJ8aDzVEn4p1xZU2U4+vCL3bxeNg1hFj5hUxHO0K5ZJSJFg6i/Mklzui4sHpdJNPVR dgqEqcTIRZa0OJiXCQ5B1j2QPfgvOeekjLd6HOOInbg3dbpMRsqJGGLdrfY5tYwAD4rE L+75rqWMMraPA7DHuka15nYf6ElidhUn2ZP6s= Received: by 10.86.95.20 with SMTP id s20mr5227392fgb.40.1236707112157; Tue, 10 Mar 2009 10:45:12 -0700 (PDT) Received: from ?192.168.1.2? (32-95.3-85.cust.bluewin.ch [85.3.95.32]) by mx.google.com with ESMTPS id l12sm5435120fgb.31.2009.03.10.10.45.11 (version=SSLv3 cipher=RC4-MD5); Tue, 10 Mar 2009 10:45:11 -0700 (PDT) Message-ID: <49B6A727.7090201@gmail.com> Date: Tue, 10 Mar 2009 18:45:11 +0100 From: phcoder User-Agent: Thunderbird 2.0.0.19 (X11/20090105) MIME-Version: 1.0 To: The development of GRUB 2 References: <49AEEF72.5050000@gmail.com> In-Reply-To: <49AEEF72.5050000@gmail.com> Content-Type: multipart/mixed; boundary="------------060305080801030109080401" X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [PATCH] parttool 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: Tue, 10 Mar 2009 17:45:15 -0000 This is a multi-part message in MIME format. --------------060305080801030109080401 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sorry I forgot include/grub/parttool.h phcoder wrote: > Hello here is the implementation of parttool with the syntax I proposed > earlier and equivalent of parttype, makeactive and hide/unhide > -- Regards Vladimir 'phcoder' Serbinenko --------------060305080801030109080401 Content-Type: text/x-chdr; name="parttool.h" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="parttool.h" /* * 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 . */ #ifndef GRUB_PARTTOOL_HEADER #define GRUB_PARTTOOL_HEADER 1 struct grub_parttool_argdesc { char *name; char *desc; enum {GRUB_PARTTOOL_ARG_END, GRUB_PARTTOOL_ARG_BOOL, GRUB_PARTTOOL_ARG_VAL} type; }; struct grub_parttool_args { int set; union { int bool; char *str; }; }; typedef grub_err_t (*grub_parttool_function_t) (const grub_device_t dev, const struct grub_parttool_args *args); struct grub_parttool { struct grub_parttool *next; char *name; int handle; int nargs; struct grub_parttool_argdesc *args; grub_parttool_function_t func; }; int grub_parttool_register(const char *part_name, const grub_parttool_function_t func, const struct grub_parttool_argdesc *args); void grub_parttool_unregister (int handle); #endif /* ! GRUB_PARTTOOL_HEADER*/ --------------060305080801030109080401--