linux/block/partitions/acorn.c

// SPDX-License-Identifier: GPL-2.0
/*
 *  Copyright (c) 1996-2000 Russell King.
 *
 *  Scan ADFS partitions on hard disk drives.  Unfortunately, there
 *  isn't a standard for partitioning drives on Acorn machines, so
 *  every single manufacturer of SCSI and IDE cards created their own
 *  method.
 */
#include <linux/buffer_head.h>
#include <linux/adfs_fs.h>

#include "check.h"

/*
 * Partition types. (Oh for reusability)
 */
#define PARTITION_RISCIX_MFM
#define PARTITION_RISCIX_SCSI
#define PARTITION_LINUX

#if defined(CONFIG_ACORN_PARTITION_CUMANA) || \
	defined(CONFIG_ACORN_PARTITION_ADFS)
static struct adfs_discrecord *
adfs_partition(struct parsed_partitions *state, char *name, char *data,
	       unsigned long first_sector, int slot)
{}
#endif

#ifdef CONFIG_ACORN_PARTITION_RISCIX

struct riscix_part {};

struct riscix_record {};

#if defined(CONFIG_ACORN_PARTITION_CUMANA) || \
	defined(CONFIG_ACORN_PARTITION_ADFS)
static int riscix_partition(struct parsed_partitions *state,
			    unsigned long first_sect, int slot,
			    unsigned long nr_sects)
{}
#endif
#endif

#define LINUX_NATIVE_MAGIC
#define LINUX_SWAP_MAGIC

struct linux_part {};

#if defined(CONFIG_ACORN_PARTITION_CUMANA) || \
	defined(CONFIG_ACORN_PARTITION_ADFS)
static int linux_partition(struct parsed_partitions *state,
			   unsigned long first_sect, int slot,
			   unsigned long nr_sects)
{}
#endif

#ifdef CONFIG_ACORN_PARTITION_CUMANA
int adfspart_check_CUMANA(struct parsed_partitions *state)
{}
#endif

#ifdef CONFIG_ACORN_PARTITION_ADFS
/*
 * Purpose: allocate ADFS partitions.
 *
 * Params : hd		- pointer to gendisk structure to store partition info.
 *	    dev		- device number to access.
 *
 * Returns: -1 on error, 0 for no ADFS boot sector, 1 for ok.
 *
 * Alloc  : hda  = whole drive
 *	    hda1 = ADFS partition on first drive.
 *	    hda2 = non-ADFS partition.
 */
int adfspart_check_ADFS(struct parsed_partitions *state)
{}
#endif

#ifdef CONFIG_ACORN_PARTITION_ICS

struct ics_part {};

static int adfspart_check_ICSLinux(struct parsed_partitions *state,
				   unsigned long block)
{}

/*
 * Check for a valid ICS partition using the checksum.
 */
static inline int valid_ics_sector(const unsigned char *data)
{}

/*
 * Purpose: allocate ICS partitions.
 * Params : hd		- pointer to gendisk structure to store partition info.
 *	    dev		- device number to access.
 * Returns: -1 on error, 0 for no ICS table, 1 for partitions ok.
 * Alloc  : hda  = whole drive
 *	    hda1 = ADFS partition 0 on first drive.
 *	    hda2 = ADFS partition 1 on first drive.
 *		..etc..
 */
int adfspart_check_ICS(struct parsed_partitions *state)
{}
#endif

#ifdef CONFIG_ACORN_PARTITION_POWERTEC
struct ptec_part {};

static inline int valid_ptec_sector(const unsigned char *data)
{}

/*
 * Purpose: allocate ICS partitions.
 * Params : hd		- pointer to gendisk structure to store partition info.
 *	    dev		- device number to access.
 * Returns: -1 on error, 0 for no ICS table, 1 for partitions ok.
 * Alloc  : hda  = whole drive
 *	    hda1 = ADFS partition 0 on first drive.
 *	    hda2 = ADFS partition 1 on first drive.
 *		..etc..
 */
int adfspart_check_POWERTEC(struct parsed_partitions *state)
{}
#endif

#ifdef CONFIG_ACORN_PARTITION_EESOX
struct eesox_part {};

/*
 * Guess who created this format?
 */
static const char eesox_name[] =;

/*
 * EESOX SCSI partition format.
 *
 * This is a goddamned awful partition format.  We don't seem to store
 * the size of the partition in this table, only the start addresses.
 *
 * There are two possibilities where the size comes from:
 *  1. The individual ADFS boot block entries that are placed on the disk.
 *  2. The start address of the next entry.
 */
int adfspart_check_EESOX(struct parsed_partitions *state)
{}
#endif