Rename "struct partition" to "struct part_geom"
Change-Id: Ifaf9795ba70f5b933599b2a6ec9415e6bd13200c
This commit is contained in:
parent
32bef00fec
commit
3be9c7c33b
20 changed files with 29 additions and 38 deletions
|
@ -501,7 +501,7 @@ void geometry(void)
|
|||
{
|
||||
struct stat dst;
|
||||
int err= 0;
|
||||
struct partition geometry;
|
||||
struct part_geom geometry;
|
||||
|
||||
if (submerged) {
|
||||
/* Geometry already known. */
|
||||
|
@ -2123,7 +2123,7 @@ scribble_region(region_t *reg, struct part_entry **pe, int *made_new)
|
|||
int
|
||||
sanitycheck_failed(char *dev, struct part_entry *pe)
|
||||
{
|
||||
struct partition part;
|
||||
struct part_geom part;
|
||||
int fd;
|
||||
unsigned long it_lowsec, it_secsize;
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ unsigned long sizeup(device)
|
|||
char *device;
|
||||
{
|
||||
int fd;
|
||||
struct partition entry;
|
||||
struct part_geom entry;
|
||||
unsigned long d;
|
||||
|
||||
if ((fd = open(device, O_RDONLY)) == -1) {
|
||||
|
|
|
@ -227,7 +227,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
void getgeom(void)
|
||||
{
|
||||
struct partition geom;
|
||||
struct part_geom geom;
|
||||
int fd, r;
|
||||
|
||||
if (override) return;
|
||||
|
|
|
@ -453,7 +453,7 @@ void geometry(void)
|
|||
{
|
||||
struct stat dst;
|
||||
int err= 0;
|
||||
struct partition geometry;
|
||||
struct part_geom geometry;
|
||||
|
||||
if (submerged) {
|
||||
/* Geometry already known. */
|
||||
|
|
|
@ -285,7 +285,7 @@ void geometry(void)
|
|||
*/
|
||||
{
|
||||
int fd;
|
||||
struct partition geometry;
|
||||
struct part_geom geometry;
|
||||
struct stat sb;
|
||||
|
||||
if ((fd= open(device, O_RDONLY)) < 0) fatal(device);
|
||||
|
|
|
@ -100,7 +100,7 @@ char *finddev(dev_t device)
|
|||
#define DSETP 0
|
||||
#define DGETP 1
|
||||
|
||||
int diocntl(dev_t device, int request, struct partition *entry)
|
||||
int diocntl(dev_t device, int request, struct part_geom *entry)
|
||||
/* Get or set the geometry of a device. */
|
||||
{
|
||||
char *name;
|
||||
|
@ -115,7 +115,7 @@ int diocntl(dev_t device, int request, struct partition *entry)
|
|||
return r;
|
||||
}
|
||||
|
||||
struct partition geometry; /* Geometry of the device. */
|
||||
struct part_geom geometry; /* Geometry of the device. */
|
||||
|
||||
void print_chs(unsigned long sector)
|
||||
{
|
||||
|
@ -154,7 +154,7 @@ void show_part(char *name, unsigned long base, unsigned long size)
|
|||
int main(int argc, char **argv)
|
||||
{
|
||||
struct stat hdst;
|
||||
struct partition whole, entry;
|
||||
struct part_geom whole, entry;
|
||||
struct part_entry table[4], *pe;
|
||||
int drive, par = 0, device, incr;
|
||||
int partf;
|
||||
|
|
|
@ -66,7 +66,7 @@ char *argv[];
|
|||
int volume = 1, fd, tty, i, init, autovolsize;
|
||||
char *p, *name;
|
||||
struct stat stb;
|
||||
struct partition part;
|
||||
struct part_geom part;
|
||||
char key;
|
||||
|
||||
/* Fetch and verify the arguments. */
|
||||
|
|
|
@ -166,7 +166,7 @@ static void w_intr_wait(void);
|
|||
static int at_intr_wait(void);
|
||||
static int w_waitfor(int mask, int value);
|
||||
static int w_waitfor_dma(int mask, int value);
|
||||
static void w_geometry(dev_t minor, struct partition *entry);
|
||||
static void w_geometry(dev_t minor, struct part_geom *entry);
|
||||
#if ENABLE_ATAPI
|
||||
static int atapi_sendpacket(u8_t *packet, unsigned cnt, int do_dma);
|
||||
static int atapi_intr_wait(int dma, size_t max);
|
||||
|
@ -1869,7 +1869,7 @@ int value; /* required status */
|
|||
/*===========================================================================*
|
||||
* w_geometry *
|
||||
*===========================================================================*/
|
||||
static void w_geometry(dev_t minor, struct partition *entry)
|
||||
static void w_geometry(dev_t minor, struct part_geom *entry)
|
||||
{
|
||||
struct wini *wn;
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ static int driver_open(int which)
|
|||
*/
|
||||
message msg;
|
||||
cp_grant_id_t gid;
|
||||
struct partition part;
|
||||
struct part_geom part;
|
||||
sector_t sectors;
|
||||
int r;
|
||||
|
||||
|
|
|
@ -241,7 +241,7 @@ static int do_vrdwt(int flag_rw)
|
|||
*===========================================================================*/
|
||||
static int do_ioctl(message *m)
|
||||
{
|
||||
struct partition sizepart;
|
||||
struct part_geom sizepart;
|
||||
|
||||
switch(m->BDEV_REQUEST) {
|
||||
case DIOCSETP:
|
||||
|
@ -260,7 +260,7 @@ static int do_ioctl(message *m)
|
|||
|
||||
if(sys_safecopyto(who_e, (vir_bytes) grant_id, 0,
|
||||
(vir_bytes) &sizepart,
|
||||
sizeof(struct partition)) != OK) {
|
||||
sizeof(struct part_geom)) != OK) {
|
||||
printf("Filter: DIOCGETP safecopyto failed\n");
|
||||
return EIO;
|
||||
}
|
||||
|
|
|
@ -261,7 +261,7 @@ static int read_id(void);
|
|||
static int f_do_open(dev_t minor, int access);
|
||||
static int f_do_close(dev_t minor);
|
||||
static int test_read(int density);
|
||||
static void f_geometry(dev_t minor, struct partition *entry);
|
||||
static void f_geometry(dev_t minor, struct part_geom *entry);
|
||||
|
||||
/* Entry points to this driver. */
|
||||
static struct blockdriver f_dtab = {
|
||||
|
@ -1350,7 +1350,7 @@ static int test_read(int density)
|
|||
/*===========================================================================*
|
||||
* f_geometry *
|
||||
*===========================================================================*/
|
||||
static void f_geometry(dev_t minor, struct partition *entry)
|
||||
static void f_geometry(dev_t minor, struct part_geom *entry)
|
||||
{
|
||||
if (f_prepare(minor) == NULL) return;
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ static ssize_t virtio_blk_transfer(dev_t minor, int write, u64_t position,
|
|||
static int virtio_blk_ioctl(dev_t minor, unsigned int req, endpoint_t endpt,
|
||||
cp_grant_id_t grant);
|
||||
static struct device * virtio_blk_part(dev_t minor);
|
||||
static void virtio_blk_geometry(dev_t minor, struct partition *entry);
|
||||
static void virtio_blk_geometry(dev_t minor, struct part_geom *entry);
|
||||
static void virtio_blk_device_intr(void);
|
||||
static void virtio_blk_spurious_intr(void);
|
||||
static void virtio_blk_intr(unsigned int irqs);
|
||||
|
@ -422,7 +422,7 @@ virtio_blk_part(dev_t minor)
|
|||
}
|
||||
|
||||
static void
|
||||
virtio_blk_geometry(dev_t minor, struct partition *entry)
|
||||
virtio_blk_geometry(dev_t minor, struct part_geom *entry)
|
||||
{
|
||||
/* Only for the drive */
|
||||
if (minor != 0)
|
||||
|
|
|
@ -23,7 +23,7 @@ struct blockdriver {
|
|||
cp_grant_id_t grant);
|
||||
void(*bdr_cleanup) (void);
|
||||
struct device *(*bdr_part)(dev_t minor);
|
||||
void(*bdr_geometry) (dev_t minor, struct partition *part);
|
||||
void(*bdr_geometry) (dev_t minor, struct part_geom *part);
|
||||
void(*bdr_intr) (unsigned int irqs);
|
||||
void(*bdr_alarm) (clock_t stamp);
|
||||
int(*bdr_other) (message *m_ptr);
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
int minix_sizeup(char *name, u64_t *bytes);
|
||||
|
||||
struct partition {
|
||||
struct part_geom {
|
||||
u64_t base; /* byte offset to the partition start */
|
||||
u64_t size; /* number of bytes in the partition */
|
||||
unsigned cylinders; /* disk geometry */
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
|
||||
#include <minix/ioctl.h>
|
||||
|
||||
#define DIOCSETP _IOW('d', 3, struct partition)
|
||||
#define DIOCGETP _IOR('d', 4, struct partition)
|
||||
#define DIOCSETP _IOW('d', 3, struct part_geom)
|
||||
#define DIOCGETP _IOR('d', 4, struct part_geom)
|
||||
#define DIOCEJECT _IO ('d', 5)
|
||||
#define DIOCTIMEOUT _IORW('d', 6, int)
|
||||
#define DIOCOPENCT _IOR('d', 7, int)
|
||||
|
|
|
@ -262,7 +262,7 @@ static int do_dioctl(struct blockdriver *bdp, dev_t minor,
|
|||
{
|
||||
/* Carry out a disk-specific I/O control request. */
|
||||
struct device *dv;
|
||||
struct partition entry;
|
||||
struct part_geom entry;
|
||||
int r = EINVAL;
|
||||
|
||||
switch (request) {
|
||||
|
|
|
@ -29,7 +29,7 @@ char *device;
|
|||
u64_t *bytes;
|
||||
{
|
||||
int fd;
|
||||
struct partition entry;
|
||||
struct part_geom entry;
|
||||
struct stat st;
|
||||
|
||||
if ((fd = open(device, O_RDONLY)) == -1) {
|
||||
|
|
|
@ -154,7 +154,7 @@ a partition. This is what <minix/partition.h> looks like:
|
|||
.sp
|
||||
.nf
|
||||
.ta +2n +25n
|
||||
struct partition {
|
||||
struct part_geom {
|
||||
u64_t base; /* byte offset to the partition start */
|
||||
u64_t size; /* number of bytes in the partition */
|
||||
unsigned cylinders; /* disk geometry for partitioning */
|
||||
|
|
|
@ -41,10 +41,6 @@
|
|||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#if defined(__minix) && !defined(_STANDALONE)
|
||||
#include <minix/partition.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Each disk has a label which includes information about the hardware
|
||||
* disk geometry, filesystem partitions, and drive specific information.
|
||||
|
@ -184,10 +180,6 @@ struct disklabel {
|
|||
uint16_t d_npartitions; /* number of partitions in following */
|
||||
uint32_t d_bbsize; /* size of boot area at sn0, bytes */
|
||||
uint32_t d_sbsize; /* max size of fs superblock, bytes */
|
||||
#if defined(__minix) && !defined(_STANDALONE)
|
||||
struct partition /* the partition table */
|
||||
d_partitions[MAXPARTITIONS]; /* actually may be more */
|
||||
#else
|
||||
struct partition { /* the partition table */
|
||||
uint32_t p_size; /* number of sectors in partition */
|
||||
uint32_t p_offset; /* starting sector */
|
||||
|
@ -207,7 +199,6 @@ struct disklabel {
|
|||
#define p_cpg __partition_u1.cpg
|
||||
#define p_sgs __partition_u1.sgs
|
||||
} d_partitions[MAXPARTITIONS]; /* actually may be more */
|
||||
#endif /* defined(__minix) */
|
||||
};
|
||||
|
||||
#if defined(__HAVE_OLD_DISKLABEL) && !HAVE_NBTOOL_CONFIG_H
|
||||
|
|
|
@ -39,7 +39,7 @@ static int max_size = 131072; /* maximum total size of any req */
|
|||
* it to a value lower than the driver supports.
|
||||
*/
|
||||
|
||||
static struct partition part; /* base and size of target partition */
|
||||
static struct part_geom part; /* base and size of target partition */
|
||||
|
||||
#define NR_OPENED 10 /* maximum number of opened devices */
|
||||
static dev_t opened[NR_OPENED]; /* list of currently opened devices */
|
||||
|
@ -1426,7 +1426,7 @@ static void vir_limits(dev_t sub0_minor, dev_t sub1_minor, int part_secs)
|
|||
/* Create virtual, temporary subpartitions through the DIOCSETP ioctl,
|
||||
* and perform tests on the resulting subpartitions.
|
||||
*/
|
||||
struct partition subpart, subpart2;
|
||||
struct part_geom subpart, subpart2;
|
||||
size_t sub_size;
|
||||
result_t res;
|
||||
|
||||
|
@ -1495,7 +1495,7 @@ static void real_limits(dev_t sub0_minor, dev_t sub1_minor, int part_secs)
|
|||
*/
|
||||
u8_t *buf_ptr;
|
||||
size_t buf_size, sub_size;
|
||||
struct partition subpart;
|
||||
struct part_geom subpart;
|
||||
struct part_entry *entry;
|
||||
result_t res;
|
||||
|
||||
|
|
Loading…
Reference in a new issue