ia64/xen-unstable

changeset 13043:bd102b60c43b

Remove the boot-type implementation -- now replaced by the HVM and PV boot
configuration.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author Ewan Mellor <ewan@xensource.com>
date Thu Dec 14 18:24:41 2006 +0000 (2006-12-14)
parents 0ee4e33b4401
children a05fefbeb19f
files tools/libxen/include/xen_boot_type.h tools/libxen/include/xen_boot_type_internal.h tools/libxen/src/xen_boot_type.c
line diff
     1.1 --- a/tools/libxen/include/xen_boot_type.h	Thu Dec 14 18:24:14 2006 +0000
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,87 +0,0 @@
     1.4 -/*
     1.5 - * Copyright (c) 2006, XenSource Inc.
     1.6 - *
     1.7 - * This library is free software; you can redistribute it and/or
     1.8 - * modify it under the terms of the GNU Lesser General Public
     1.9 - * License as published by the Free Software Foundation; either
    1.10 - * version 2.1 of the License, or (at your option) any later version.
    1.11 - *
    1.12 - * This library is distributed in the hope that it will be useful,
    1.13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    1.15 - * Lesser General Public License for more details.
    1.16 - *
    1.17 - * You should have received a copy of the GNU Lesser General Public
    1.18 - * License along with this library; if not, write to the Free Software
    1.19 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
    1.20 - */
    1.21 -
    1.22 -#ifndef XEN_BOOT_TYPE_H
    1.23 -#define XEN_BOOT_TYPE_H
    1.24 -
    1.25 -
    1.26 -#include "xen_common.h"
    1.27 -
    1.28 -
    1.29 -enum xen_boot_type
    1.30 -{
    1.31 -    /**
    1.32 -     * boot an HVM guest using an emulated BIOS
    1.33 -     */
    1.34 -    XEN_BOOT_TYPE_BIOS,
    1.35 -
    1.36 -    /**
    1.37 -     * boot from inside the machine using grub
    1.38 -     */
    1.39 -    XEN_BOOT_TYPE_GRUB,
    1.40 -
    1.41 -    /**
    1.42 -     * boot from an external kernel
    1.43 -     */
    1.44 -    XEN_BOOT_TYPE_KERNEL_EXTERNAL,
    1.45 -
    1.46 -    /**
    1.47 -     * boot from a kernel inside the guest filesystem
    1.48 -     */
    1.49 -    XEN_BOOT_TYPE_KERNEL_INTERNAL
    1.50 -};
    1.51 -
    1.52 -
    1.53 -typedef struct xen_boot_type_set
    1.54 -{
    1.55 -    size_t size;
    1.56 -    enum xen_boot_type contents[];
    1.57 -} xen_boot_type_set;
    1.58 -
    1.59 -/**
    1.60 - * Allocate a xen_boot_type_set of the given size.
    1.61 - */
    1.62 -extern xen_boot_type_set *
    1.63 -xen_boot_type_set_alloc(size_t size);
    1.64 -
    1.65 -/**
    1.66 - * Free the given xen_boot_type_set.  The given set must have been
    1.67 - * allocated by this library.
    1.68 - */
    1.69 -extern void
    1.70 -xen_boot_type_set_free(xen_boot_type_set *set);
    1.71 -
    1.72 -
    1.73 -/**
    1.74 - * Return the name corresponding to the given code.  This string must
    1.75 - * not be modified or freed.
    1.76 - */
    1.77 -extern const char *
    1.78 -xen_boot_type_to_string(enum xen_boot_type val);
    1.79 -
    1.80 -
    1.81 -/**
    1.82 - * Return the correct code for the given string, or set the session
    1.83 - * object to failure and return an undefined value if the given string does
    1.84 - * not match a known code.
    1.85 - */
    1.86 -extern enum xen_boot_type
    1.87 -xen_boot_type_from_string(xen_session *session, const char *str);
    1.88 -
    1.89 -
    1.90 -#endif
     2.1 --- a/tools/libxen/include/xen_boot_type_internal.h	Thu Dec 14 18:24:14 2006 +0000
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,37 +0,0 @@
     2.4 -/*
     2.5 - * Copyright (c) 2006, XenSource Inc.
     2.6 - *
     2.7 - * This library is free software; you can redistribute it and/or
     2.8 - * modify it under the terms of the GNU Lesser General Public
     2.9 - * License as published by the Free Software Foundation; either
    2.10 - * version 2.1 of the License, or (at your option) any later version.
    2.11 - *
    2.12 - * This library is distributed in the hope that it will be useful,
    2.13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
    2.14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    2.15 - * Lesser General Public License for more details.
    2.16 - *
    2.17 - * You should have received a copy of the GNU Lesser General Public
    2.18 - * License along with this library; if not, write to the Free Software
    2.19 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
    2.20 - */
    2.21 -
    2.22 -
    2.23 -/*
    2.24 - * Declarations of the abstract types used during demarshalling of enum
    2.25 - * xen_boot_type.  Internal to this library -- do not use from outside.
    2.26 - */
    2.27 -
    2.28 -
    2.29 -#ifndef XEN_BOOT_TYPE_INTERNAL_H
    2.30 -#define XEN_BOOT_TYPE_INTERNAL_H
    2.31 -
    2.32 -
    2.33 -#include "xen_internal.h"
    2.34 -
    2.35 -
    2.36 -extern const abstract_type xen_boot_type_abstract_type_;
    2.37 -extern const abstract_type xen_boot_type_set_abstract_type_;
    2.38 -
    2.39 -
    2.40 -#endif
     3.1 --- a/tools/libxen/src/xen_boot_type.c	Thu Dec 14 18:24:14 2006 +0000
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,83 +0,0 @@
     3.4 -/*
     3.5 - * Copyright (c) 2006, XenSource Inc.
     3.6 - *
     3.7 - * This library is free software; you can redistribute it and/or
     3.8 - * modify it under the terms of the GNU Lesser General Public
     3.9 - * License as published by the Free Software Foundation; either
    3.10 - * version 2.1 of the License, or (at your option) any later version.
    3.11 - *
    3.12 - * This library is distributed in the hope that it will be useful,
    3.13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
    3.14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    3.15 - * Lesser General Public License for more details.
    3.16 - *
    3.17 - * You should have received a copy of the GNU Lesser General Public
    3.18 - * License along with this library; if not, write to the Free Software
    3.19 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
    3.20 - */
    3.21 -
    3.22 -#include <string.h>
    3.23 -
    3.24 -#include "xen_internal.h"
    3.25 -#include "xen_boot_type.h"
    3.26 -#include "xen_boot_type_internal.h"
    3.27 -
    3.28 -
    3.29 -/*
    3.30 - * Maintain this in the same order as the enum declaration!
    3.31 - */
    3.32 -static const char *lookup_table[] =
    3.33 -{
    3.34 -    "bios",
    3.35 -    "grub",
    3.36 -    "kernel_external",
    3.37 -    "kernel_internal"
    3.38 -};
    3.39 -
    3.40 -
    3.41 -extern xen_boot_type_set *
    3.42 -xen_boot_type_set_alloc(size_t size)
    3.43 -{
    3.44 -    return calloc(1, sizeof(xen_boot_type_set) +
    3.45 -                  size * sizeof(enum xen_boot_type));
    3.46 -}
    3.47 -
    3.48 -
    3.49 -extern void
    3.50 -xen_boot_type_set_free(xen_boot_type_set *set)
    3.51 -{
    3.52 -    free(set);
    3.53 -}
    3.54 -
    3.55 -
    3.56 -const char *
    3.57 -xen_boot_type_to_string(enum xen_boot_type val)
    3.58 -{
    3.59 -    return lookup_table[val];
    3.60 -}
    3.61 -
    3.62 -
    3.63 -extern enum xen_boot_type
    3.64 -xen_boot_type_from_string(xen_session *session, const char *str)
    3.65 -{
    3.66 -    return ENUM_LOOKUP(session, str, lookup_table);
    3.67 -}
    3.68 -
    3.69 -
    3.70 -const abstract_type xen_boot_type_abstract_type_ =
    3.71 -    {
    3.72 -        .typename = ENUM,
    3.73 -        .enum_marshaller =
    3.74 -             (const char *(*)(int))&xen_boot_type_to_string,
    3.75 -        .enum_demarshaller =
    3.76 -             (int (*)(xen_session *, const char *))&xen_boot_type_from_string
    3.77 -    };
    3.78 -
    3.79 -
    3.80 -const abstract_type xen_boot_type_set_abstract_type_ =
    3.81 -    {
    3.82 -        .typename = SET,
    3.83 -        .child = &xen_boot_type_abstract_type_
    3.84 -    };
    3.85 -
    3.86 -