Пример #1
0
void 
bpb_dump(bpb_t *bpb)
{
	printf ("JmpOpeCode:%p %p %p\n", bpb->jmp_ope_code[0],
			bpb->jmp_ope_code[1], bpb->jmp_ope_code[2]);
	printf ("OEMName:");
	putns ((const char *) bpb->oem_name, 8);
	printf ("\nBytesPerSector:%u\n", bpb->bytes_per_sector);
	printf ("SectorsPerCluster:%u\n", bpb->sectors_per_cluster);
	printf ("ReservedSectors:%u\n", bpb->reserved_sectors);
	printf ("NumberOfFATs:%u\n", bpb->number_of_fats);
	printf ("RootEntries:%u\n", bpb->root_entries);
	printf ("TotalSectors16:%u\n", bpb->total_sectors16);
	printf ("MediaDescriptor:%u\n", bpb->media_descriptor);
	printf ("SectorsPerFAT16:%u\n", bpb->sectors_per_fat16);
	printf ("SectorsPerTrack:%u\n", bpb->sectors_per_track);
	printf ("Heads:%u\n", bpb->heads);
	printf ("HiddenSectors:%u\n", bpb->hidden_sectors);
	printf ("TotalSectors32:%u\n", bpb->total_sectors32);

	printf ("SectorsPerFAT32:%u\n", bpb->sectors_per_fat32);
	printf ("ExtFlags:%u\n", bpb->ext_flags);
	printf ("FSVersion:%u\n", bpb->fs_version);
	printf ("RootDirCluster:%u\n", bpb->root_dir_cluster);
	printf ("FSInfoSector:%u\n", bpb->fs_info_sector);
	printf ("BackupBootSector:%u\n", bpb->backup_boot_sector);
	printf ("DriveNumber:%u\n", bpb->drive_number);
	printf ("BootSignature:%u\n", bpb->boot_signature);
	printf ("VolumeID:%u\n", bpb->volume_id);
	printf ("VolumeLabel:");
	putns ((const char *) bpb->volume_label, 11);
	printf ("\nFileSystemType:");
	putns ((const char *) bpb->file_system_type, 8);
	printf ("\nSignature:%p\n", bpb->signature);
}
Пример #2
0
Файл: use.c Проект: 8l/myrddin
static Stab *findstab(Stab *st, char *pkg)
{
    Stab *s;

    if (!pkg) {
        if (!st->name)
            return st;
        else
            return NULL;
    }

    s = getns(file, pkg);
    if (!s) {
        s = mkstab(0);
        s->name = strdup(pkg);
        putns(file, s);
    }
    return s;
}