struct fdisk_label head; /* generic part */
};
-static short volumes=1;
-
static sgiinfo *fill_sgiinfo(void);
/*
cxt->label->nparts_max = SGI_MAXPARTITIONS;
cxt->label->nparts_cur = count_used_partitions(cxt);
- volumes = 15;
return 1;
}
printf(_("----- Bootinfo -----\nBootfile: %s\n"
"----- Directory Entries -----\n"),
sgilabel->boot_file);
- for (i = 0 ; i < (size_t) volumes; i++) {
+ for (i = 0 ; i < SGI_MAXVOLUMES; i++) {
if (sgilabel->volume[i].num_bytes) {
uint32_t start = be32_to_cpu(sgilabel->volume[i].block_num);
uint32_t len = be32_to_cpu(sgilabel->volume[i].num_bytes);
sgilabel->devparam.xylogics_readgate = cpu_to_be16(0);
sgilabel->devparam.xylogics_writecont = cpu_to_be16(0);
- memset(&(sgilabel->volume), 0, sizeof(struct sgi_volume) * 15);
- memset(&(sgilabel->partitions), 0, sizeof(struct sgi_partition)*16);
- cxt->label->nparts_max = 16;
- volumes = 15;
+ memset(&(sgilabel->volume), 0,
+ sizeof(struct sgi_volume) * SGI_MAXVOLUMES);
+ memset(&(sgilabel->partitions), 0,
+ sizeof(struct sgi_partition) * SGI_MAXPARTITIONS);
+ cxt->label->nparts_max = SGI_MAXPARTITIONS;
sgi_set_entire(cxt);
sgi_set_volhdr(cxt);
#include <stdint.h>
#define SGI_MAXPARTITIONS 16
+#define SGI_MAXVOLUMES 15
/* partition types */
enum {
unsigned char name[8]; /* name of volume */
uint32_t block_num; /* logical block number */
uint32_t num_bytes; /* how big, in bytes */
- } __attribute__((packed)) volume[15];
+ } __attribute__((packed)) volume[SGI_MAXVOLUMES];
struct sgi_partition {
uint32_t num_blocks; /* size in logical blocks */