All of lore.kernel.org
 help / color / mirror / Atom feed
From: phcoder <phcoder@gmail.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] parttool
Date: Tue, 10 Mar 2009 18:45:11 +0100	[thread overview]
Message-ID: <49B6A727.7090201@gmail.com> (raw)
In-Reply-To: <49AEEF72.5050000@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 243 bytes --]

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

[-- Attachment #2: parttool.h --]
[-- Type: text/x-chdr, Size: 1552 bytes --]

/*
 *  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 <http://www.gnu.org/licenses/>.
 */

#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*/

  reply	other threads:[~2009-03-10 17:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-04 21:15 [PATCH] parttool phcoder
2009-03-10 17:45 ` phcoder [this message]
2009-03-20 19:33   ` phcoder
2009-04-04  9:22     ` phcoder
2009-04-05 14:48       ` Yoshinori K. Okuji
2009-04-06  9:52         ` phcoder
2009-04-06 15:53           ` Pavel Roskin
2009-04-06 15:56             ` phcoder
2009-04-06 16:20               ` Pavel Roskin
2009-04-06 16:25                 ` phcoder
2009-04-06 16:33                   ` Pavel Roskin
2009-04-08  9:35                     ` phcoder
2009-04-08 20:24                       ` Pavel Roskin
2009-04-17 11:12                         ` phcoder
2009-04-25 12:21                           ` Vladimir Serbinenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49B6A727.7090201@gmail.com \
    --to=phcoder@gmail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.