solaris_x86.c revision 7e7bd3dccbfe8f79e25e5c1554b5bc3a9aaca321
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* libparted - a library for manipulating disk partitions
*
* This module recognizes the Solaris x86 VTOC so that the
* partition can be identified as "solaris".
*
* Mark Logan <mark.logan@sun.com>
*/
#include <config.h>
#if ENABLE_NLS
#include <libintl.h>
#else
#endif /* ENABLE_NLS */
#include <unistd.h>
#include <string.h>
#define VTOC_SANE 0x600DDEEE
#define LEN_DKL_VVOL 8
#define LEN_DKL_PAD \
(512 - \
((5 * sizeof (uint32_t)) + \
LEN_DKL_VVOL + \
(2 * sizeof (uint16_t)) + \
(10 * sizeof (uint32_t)) + \
LEN_DKL_ASCII + \
(2 * (sizeof (uint16_t)))))
struct partition {
unsigned short p_tag; /* ID tag of partition */
unsigned short p_flag; /* permission flags */
long p_start; /* start sector no of partition */
long p_size; /* # of blocks in partition */
};
struct vtoc {
unsigned long v_sanity; /* to verify vtoc sanity */
unsigned long v_version; /* layout version */
unsigned short v_sectorsz; /* sector size in bytes */
unsigned short v_nparts; /* number of partitions */
};
static PedGeometry*
{
return (0);
return (0);
/*
* Use the size of the backup slice:
*/
}
return (NULL);
}
#ifndef DISCOVER_ONLY
static int
{
return (0);
}
#endif /* !DISCOVER_ONLY */
static PedFileSystemOps solaris_x86_ops = {
#ifndef DISCOVER_ONLY
#else
#endif
};
static PedFileSystemType solaris_x86_type = {
.ops = &solaris_x86_ops,
.name = "solaris",
};
void
{
}
void
{
}