aix.c revision 7e7bd3dccbfe8f79e25e5c1554b5bc3a9aaca321
/* -*- Mode: c; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
libparted - a library for manipulating disk partitions
Copyright (C) 2000, 2001, 2007 Free Software Foundation, Inc.
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.
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
Contributor: Matt Wilson <msw@redhat.com>
*/
#include <config.h>
#if ENABLE_NLS
# include <libintl.h>
#else
#endif /* ENABLE_NLS */
#define AIX_LABEL_MAGIC 0xc9c2d4c1
static PedDiskType aix_disk_type;
static inline int
aix_label_magic_get (const char *label)
{
return *(unsigned int *)label;
}
static inline void
{
}
/* Read a single sector, of length DEV->sector_size, into malloc'd storage.
If the read fails, free the memory and return zero without modifying *BUF.
Otherwise, set *BUF to the new buffer and return 1. */
static int
{
PED_ASSERT (b != NULL, return 0);
ped_free (b);
return 0;
}
*buf = b;
return 1;
}
static int
{
char *label;
return 0;
return magic == AIX_LABEL_MAGIC;
}
#ifndef DISCOVER_ONLY
static int
{
return 0;
char *label;
return 0;
aix_label_magic_set (label, 0);
return result;
}
#endif /* !DISCOVER_ONLY */
static PedDisk*
{
if (!disk)
return NULL;
return disk;
}
static PedDisk*
{
if (!new_disk)
return NULL;
return new_disk;
}
static void
{
}
static int
{
_("Support for reading AIX disk labels is "
"is not implemented yet."));
return 0;
}
#ifndef DISCOVER_ONLY
static int
{
_("Support for writing AIX disk labels is "
"is not implemented yet."));
return 0;
}
#endif /* !DISCOVER_ONLY */
static PedPartition*
const PedFileSystemType* fs_type,
{
_("Support for adding partitions to AIX disk "
"labels is not implemented yet."));
return NULL;
}
static PedPartition*
{
_("Support for duplicating partitions in AIX "
"disk labels is not implemented yet."));
return NULL;
}
static void
{
}
static int
{
_("Support for setting system type of partitions "
"in AIX disk labels is not implemented yet."));
return 0;
}
static int
{
_("Support for setting flags "
"in AIX disk labels is not implemented yet."));
return 0;
}
static int
{
return 0;
}
static int
{
return 0;
}
static int
{
return 4;
}
static int
{
return 1;
}
static int
{
return 1;
}
static int
{
return 1;
}
static PedDiskOps aix_disk_ops = {
#ifndef DISCOVER_ONLY
.clobber = aix_clobber,
#else
#endif
#ifndef DISCOVER_ONLY
#else
#endif
};
static PedDiskType aix_disk_type = {
.name = "aix",
.ops = &aix_disk_ops,
.features = 0
};
void
{
}
void
{
}