Lines Matching refs:sgilabel

106 #define sgilabel ((sgi_partition *)MBRbuffer)  macro
107 #define sgiparam (sgilabel->devparam)
203 return SGI_SSWAP16(sgilabel->devparam.nsect); in sgi_get_nsect()
209 return SGI_SSWAP16(sgilabel->devparam.ntrks); in sgi_get_ntrks()
235 if (sgilabel->magic != SGI_LABEL_MAGIC in check_sgi_label()
236 && sgilabel->magic != SGI_LABEL_MAGIC_SWAPPED in check_sgi_label()
242 sgi_other_endian = (sgilabel->magic == SGI_LABEL_MAGIC_SWAPPED); in check_sgi_label()
246 if (two_s_complement_32bit_sum((unsigned int*)sgilabel, in check_sgi_label()
247 sizeof(*sgilabel))) { in check_sgi_label()
260 return SGI_SSWAP32(sgilabel->partitions[i].start_sector); in sgi_get_start_sector()
266 return SGI_SSWAP32(sgilabel->partitions[i].num_sectors); in sgi_get_num_sectors()
272 return SGI_SSWAP32(sgilabel->partitions[i].id); in sgi_get_sysid()
278 return SGI_SSWAP16(sgilabel->boot_part); in sgi_get_bootpartition()
284 return SGI_SSWAP16(sgilabel->swap_part); in sgi_get_swappartition()
303 (char *)sgilabel, in sgi_list_table()
341 sgilabel->boot_file); in sgi_list_table()
343 if (sgilabel->directory[i].vol_file_size) { in sgi_list_table()
344 uint32_t start = SGI_SSWAP32(sgilabel->directory[i].vol_file_start); in sgi_list_table()
345 uint32_t len = SGI_SSWAP32(sgilabel->directory[i].vol_file_size); in sgi_list_table()
346 unsigned char *name = sgilabel->directory[i].vol_file_name; in sgi_list_table()
357 sgilabel->boot_part = SGI_SSWAP16(((short)i)); in sgi_set_bootpartition()
369 sgilabel->swap_part = SGI_SSWAP16(((short)i)); in sgi_set_swappartition()
389 if (strncmp(aFile, (char*)sgilabel->boot_file, 16)) { in sgi_check_bootfile()
401 return (char*)sgilabel->boot_file; in sgi_get_bootfile()
413 sgilabel->boot_file[i] = aFile[i]; in sgi_set_bootfile()
415 sgilabel->boot_file[i] = 0; in sgi_set_bootfile()
418 printf("\n\tBootfile is changed to \"%s\"\n", sgilabel->boot_file); in sgi_set_bootfile()
426 sgilabel->directory[0].vol_file_start = SGI_SSWAP32(2); in create_sgiinfo()
427 sgilabel->directory[0].vol_file_size = SGI_SSWAP32(sizeof(sgiinfo)); in create_sgiinfo()
428 memcpy((char*)sgilabel->directory[0].vol_file_name, "sgilabel", 8); in create_sgiinfo()
436 sgilabel->csum = 0; in sgi_write_table()
437 sgilabel->csum = SGI_SSWAP32(two_s_complement_32bit_sum( in sgi_write_table()
438 (unsigned int*)sgilabel, sizeof(*sgilabel))); in sgi_write_table()
440 (unsigned int*)sgilabel, sizeof(*sgilabel)) == 0); in sgi_write_table()
442 write_sector(0, sgilabel); in sgi_write_table()
443 if (is_prefixed_with((char*)sgilabel->directory[0].vol_file_name, "sgilabel")) { in sgi_write_table()
449 int infostartblock = SGI_SSWAP32(sgilabel->directory[0].vol_file_start); in sgi_write_table()
629 sgilabel->partitions[i].id = SGI_SSWAP32(sys); in sgi_change_sysid()
647 sgilabel->partitions[i].id = SGI_SSWAP32(sys); in sgi_set_partition()
648 sgilabel->partitions[i].num_sectors = SGI_SSWAP32(length); in sgi_set_partition()
649 sgilabel->partitions[i].start_sector = SGI_SSWAP32(start); in sgi_set_partition()
816 sgilabel->magic = SGI_SSWAP32(SGI_LABEL_MAGIC); in create_sgilabel()
818 sgilabel->swap_part = SGI_SSWAP16(1); in create_sgilabel()
821 strcpy((char*)sgilabel->boot_file, "/unix"); /* sizeof(sgilabel->boot_file) == 16 > 6 */ in create_sgilabel()
827 sgilabel->devparam.pcylcount = SGI_SSWAP16(geometry.cylinders); in create_sgilabel()
830 sgilabel->devparam.ntrks = SGI_SSWAP16(geometry.heads); in create_sgilabel()
835 sgilabel->devparam.nsect = SGI_SSWAP16(geometry.sectors); in create_sgilabel()
836 sgilabel->devparam.bytes = SGI_SSWAP16(512); in create_sgilabel()
837 sgilabel->devparam.ilfact = SGI_SSWAP16(1); in create_sgilabel()
838 sgilabel->devparam.flags = SGI_SSWAP32(TRACK_FWD| in create_sgilabel()
841 sgilabel->devparam.retries_on_error = SGI_SSWAP32(1); in create_sgilabel()