#include "fdiskaixlabel.h"
#include "nls.h"
-#define aixlabel ((aix_partition *)cxt->firstsector)
-
static int other_endian = 0;
static short volumes=1;
void
aix_nolabel(struct fdisk_context *cxt)
{
+ struct aix_partition *aixlabel = (struct aix_partition *) cxt->firstsector;
+
aixlabel->magic = 0;
partitions = 4;
fdisk_zeroize_firstsector(cxt);
static int aix_probe_label(struct fdisk_context *cxt)
{
+ struct aix_partition *aixlabel = (struct aix_partition *) cxt->firstsector;
+
if (aixlabel->magic != AIX_LABEL_MAGIC &&
aixlabel->magic != AIX_LABEL_MAGIC_SWAPPED) {
other_endian = 0;
return 1;
}
-static void aix_add_partition(struct fdisk_context *cxt, int partnum, int parttype)
+static void aix_add_partition(
+ struct fdisk_context *cxt __attribute__((__unused__)),
+ int partnum __attribute__((__unused__)),
+ int parttype __attribute__((__unused__)))
{
printf(_("\tSorry - this fdisk cannot handle AIX disk labels."
"\n\tIf you want to add DOS-type partitions, create"
* the terms of the GNU Public License.
*/
-typedef struct {
+struct aix_partition {
unsigned int magic; /* expect AIX_LABEL_MAGIC */
unsigned int fillbytes1[124];
unsigned int physical_volume_id;
unsigned int fillbytes2[124];
-} aix_partition;
+};
#define AIX_LABEL_MAGIC 0xc9c2d4c1
#define AIX_LABEL_MAGIC_SWAPPED 0xc1d4c2c9