Lines Matching defs:table

215 	struct g_part_apm_table *table;
219 table = (struct g_part_apm_table *)basetable;
221 entry->ent.ent_pmblkcnt = table->self.ent_pmblkcnt;
238 if (baseentry->gpe_index >= table->self.ent_pmblkcnt)
239 table->self.ent_pmblkcnt = baseentry->gpe_index + 1;
240 KASSERT(table->self.ent_size >= table->self.ent_pmblkcnt,
242 KASSERT(table->self.ent_size > baseentry->gpe_index,
251 struct g_part_apm_table *table;
258 table = (struct g_part_apm_table *)basetable;
270 table->ddr.ddr_sig = APM_DDR_SIG;
271 table->ddr.ddr_blksize = pp->sectorsize;
272 table->ddr.ddr_blkcount = last + 1;
274 table->self.ent_sig = APM_ENT_SIG;
275 table->self.ent_pmblkcnt = basetable->gpt_entries + 1;
276 table->self.ent_start = 1;
277 table->self.ent_size = table->self.ent_pmblkcnt;
278 strcpy(table->self.ent_name, "Apple");
279 strcpy(table->self.ent_type, APM_ENT_TYPE_SELF);
293 g_part_apm_dumpconf(struct g_part_table *table, struct g_part_entry *baseentry,
324 g_part_apm_dumpto(struct g_part_table *table, struct g_part_entry *baseentry)
380 g_part_apm_name(struct g_part_table *table, struct g_part_entry *baseentry,
392 struct g_part_apm_table *table;
400 table = (struct g_part_apm_table *)basetable;
401 table->tivo_series1 = 0;
414 table->ddr.ddr_sig = be16dec(buf);
415 table->ddr.ddr_blksize = be16dec(buf + 2);
416 table->ddr.ddr_blkcount = be32dec(buf + 4);
418 if (table->ddr.ddr_blksize != pp->sectorsize)
420 if (table->ddr.ddr_blkcount > pp->mediasize / pp->sectorsize)
434 table->ddr.ddr_sig = APM_DDR_SIG; /* XXX */
435 table->ddr.ddr_blksize = pp->sectorsize; /* XXX */
436 table->ddr.ddr_blkcount =
438 table->tivo_series1 = 1;
443 error = apm_read_ent(cp, 1, &table->self, table->tivo_series1);
446 if (table->self.ent_sig != APM_ENT_SIG)
448 if (strcmp(table->self.ent_type, APM_ENT_TYPE_SELF))
450 if (table->self.ent_pmblkcnt >= table->ddr.ddr_blkcount)
460 struct g_part_apm_table *table;
463 table = (struct g_part_apm_table *)basetable;
465 basetable->gpt_first = table->self.ent_size + 1;
466 basetable->gpt_last = table->ddr.ddr_blkcount - 1;
467 basetable->gpt_entries = table->self.ent_size - 1;
469 for (index = table->self.ent_pmblkcnt - 1; index > 0; index--) {
470 error = apm_read_ent(cp, index + 1, &ent, table->tivo_series1);
524 struct g_part_apm_table *table;
531 table = (struct g_part_apm_table *)basetable;
535 if (table->tivo_series1)
541 be16enc(buf, table->ddr.ddr_sig);
542 be16enc(buf + 2, table->ddr.ddr_blksize);
543 be32enc(buf + 4, table->ddr.ddr_blkcount);
551 tblsz = table->self.ent_pmblkcnt;
556 be32enc(buf + 4, table->self.ent_pmblkcnt);
557 be32enc(buf + 8, table->self.ent_start);
558 be32enc(buf + 12, table->self.ent_size);
559 bcopy(table->self.ent_name, buf + 16, sizeof(table->self.ent_name));
560 bcopy(table->self.ent_type, buf + 48, sizeof(table->self.ent_type));
568 be32enc(ptr + 4, table->self.ent_pmblkcnt);