• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/src/router/busybox-1.x/util-linux/

Lines Matching refs:sunlabel

85 	sunlabel->infos[i].id = sysid;
86 sunlabel->partitions[i].start_cylinder =
88 sunlabel->partitions[i].num_sectors =
99 if (sunlabel->magic != SUN_LABEL_MAGIC
100 && sunlabel->magic != SUN_LABEL_MAGIC_SWAPPED) {
105 sun_other_endian = (sunlabel->magic == SUN_LABEL_MAGIC_SWAPPED);
106 ush = ((unsigned short *) (sunlabel + 1)) - 1;
107 for (csum = 0; ush >= (unsigned short *)sunlabel;) csum ^= *ush--;
114 heads = SUN_SSWAP16(sunlabel->ntrks);
115 cylinders = SUN_SSWAP16(sunlabel->ncyl);
116 sectors = SUN_SSWAP16(sunlabel->nsect);
242 sunlabel->magic = SUN_SSWAP16(SUN_LABEL_MAGIC);
285 sunlabel->nacyl = 0;
286 sunlabel->pcylcount = SUN_SSWAP16(cylinders);
287 sunlabel->rspeed = SUN_SSWAP16(300);
288 sunlabel->ilfact = SUN_SSWAP16(1);
289 sunlabel->sparecyl = 0;
297 sunlabel->nacyl = SUN_SSWAP16(read_int(0, 2, 65535, 0, "Alternate cylinders"));
298 sunlabel->pcylcount = SUN_SSWAP16(read_int(0, cylinders+SUN_SSWAP16(sunlabel->nacyl), 65535, 0, "Physical cylinders"));
299 sunlabel->rspeed = SUN_SSWAP16(read_int(1, 5400, 100000, 0, "Rotation speed (rpm)"));
300 sunlabel->ilfact = SUN_SSWAP16(read_int(1, 1, 32, 0, "Interleave factor"));
301 sunlabel->sparecyl = SUN_SSWAP16(read_int(0, 0, sectors, 0, "Extra sectors per cylinder"));
304 sunlabel->sparecyl = SUN_SSWAP16(p->sparecyl);
305 sunlabel->ncyl = SUN_SSWAP16(p->ncyl);
306 sunlabel->nacyl = SUN_SSWAP16(p->nacyl);
307 sunlabel->pcylcount = SUN_SSWAP16(p->pcylcount);
308 sunlabel->ntrks = SUN_SSWAP16(p->ntrks);
309 sunlabel->nsect = SUN_SSWAP16(p->nsect);
310 sunlabel->rspeed = SUN_SSWAP16(p->rspeed);
311 sunlabel->ilfact = SUN_SSWAP16(1);
318 snprintf((char *)(sunlabel->info), sizeof(sunlabel->info),
322 cylinders, SUN_SSWAP16(sunlabel->nacyl), heads, sectors);
324 sunlabel->ntrks = SUN_SSWAP16(heads);
325 sunlabel->nsect = SUN_SSWAP16(sectors);
326 sunlabel->ncyl = SUN_SSWAP16(cylinders);
336 sunlabel->infos[1].flags |= 0x01; /* Not mountable */
340 unsigned short *ush = (unsigned short *)sunlabel;
342 while (ush < (unsigned short *)(&sunlabel->csum))
344 sunlabel->csum = csum;
355 if (sunlabel->infos[i].flags & mask)
356 sunlabel->infos[i].flags &= ~mask;
358 sunlabel->infos[i].flags |= mask;
370 if (sunlabel->partitions[i].num_sectors
371 && sunlabel->infos[i].id
372 && sunlabel->infos[i].id != SUN_WHOLE_DISK) {
373 starts[i] = SUN_SSWAP32(sunlabel->partitions[i].start_cylinder) * heads * sectors;
374 lens[i] = SUN_SSWAP32(sunlabel->partitions[i].num_sectors);
476 if (sunlabel->partitions[n].num_sectors && sunlabel->infos[n].id) {
582 && sunlabel->infos[i].id == SUN_WHOLE_DISK
583 && !sunlabel->partitions[i].start_cylinder
584 && (nsec = SUN_SSWAP32(sunlabel->partitions[i].num_sectors)) == heads * sectors * cylinders)
589 sunlabel->infos[i].id = 0;
590 sunlabel->partitions[i].num_sectors = 0;
596 if (sys == LINUX_SWAP && !sunlabel->partitions[i].start_cylinder) {
610 sunlabel->infos[i].flags |= 0x01;
615 sunlabel->infos[i].flags &= ~0x01;
618 sunlabel->infos[i].id = sys;
634 disk_device, heads, sectors, SUN_SSWAP16(sunlabel->rspeed),
635 cylinders, SUN_SSWAP16(sunlabel->nacyl),
636 SUN_SSWAP16(sunlabel->pcylcount),
637 SUN_SSWAP16(sunlabel->sparecyl),
638 SUN_SSWAP16(sunlabel->ilfact),
639 (char *)sunlabel,
651 if (sunlabel->partitions[i].num_sectors) {
652 uint32_t start = SUN_SSWAP32(sunlabel->partitions[i].start_cylinder) * heads * sectors;
653 uint32_t len = SUN_SSWAP32(sunlabel->partitions[i].num_sectors);
656 (sunlabel->infos[i].flags & 0x01) ? 'u' : ' ', /* flags */
657 (sunlabel->infos[i].flags & 0x10) ? 'r' : ' ',
661 sunlabel->infos[i].id, /* type id */
662 partition_type(sunlabel->infos[i].id)); /* type name */
672 sunlabel->nacyl =
673 SUN_SSWAP16(read_int(0, SUN_SSWAP16(sunlabel->nacyl), 65535, 0,
680 sunlabel->ncyl = SUN_SSWAP16(cyl);
686 sunlabel->sparecyl =
687 SUN_SSWAP16(read_int(0, SUN_SSWAP16(sunlabel->sparecyl), sectors, 0,
694 sunlabel->ilfact =
695 SUN_SSWAP16(read_int(1, SUN_SSWAP16(sunlabel->ilfact), 32, 0,
702 sunlabel->rspeed =
703 SUN_SSWAP16(read_int(1, SUN_SSWAP16(sunlabel->rspeed), 100000, 0,
710 sunlabel->pcylcount =
711 SUN_SSWAP16(read_int(0, SUN_SSWAP16(sunlabel->pcylcount), 65535, 0,
719 unsigned short *ush = (unsigned short *)sunlabel;
722 while (ush < (unsigned short *)(&sunlabel->csum))
724 sunlabel->csum = csum;
727 if (write(fd, sunlabel, SECTOR_SIZE) != SECTOR_SIZE)