• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/mtools-4.0.10/

Lines Matching refs:boot

57 static int init_geometry_boot(struct bootsector *boot, struct device *dev,
68 set_word(boot->nsect, dev->sectors);
69 set_word(boot->nheads, dev->heads);
74 set_word(boot->psect, *tot_sectors);
75 set_dword(boot->bigsect, 0);
77 set_word(boot->psect, 0);
78 set_dword(boot->bigsect, *tot_sectors);
83 strncpy(boot->banner, "2M-STV04", 8);
84 boot->ext.old.res_2m = 0;
85 boot->ext.old.fmt_2mf = 6;
87 boot->ext.old.wt = 1;
89 boot->ext.old.wt = 0;
90 boot->ext.old.rate_0= rate_0;
91 boot->ext.old.rate_any= rate_any;
92 if (boot->ext.old.rate_any== 2 )
93 boot->ext.old.rate_any= 1;
97 set_word(boot->ext.old.Infp0, i);
98 uchr(boot)[i++] = sectors0;
99 uchr(boot)[i++] = 108;
101 uchr(boot)[i++] = j;
103 set_word(boot->ext.old.InfpX, i);
105 uchr(boot)[i++] = 64;
106 uchr(boot)[i++] = 3;
114 uchr(boot)[i++] = 128 + j;
115 uchr(boot)[i++] = j++;
116 uchr(boot)[i++] = size2;
119 uchr(boot)[nb_renum] = ( i - nb_renum - 1 ) / 3;
121 set_word(boot->ext.old.InfTm, i);
128 uchr(boot)[i++] = size2;
132 set_word(boot->ext.old.BootP,i);
137 sum += uchr(boot)[j];/* checksum */
138 boot->ext.old.CheckSum=-sum;
142 boot->jump[0] = 0xeb;
143 boot->jump[1] = 0;
144 boot->jump[2] = 0x90;
145 strncpy(boot->banner, mformat_banner, 8);
230 * the "remaining sectors" after directory and boot
281 static __inline__ void format_root(Fs_t *Fs, char *label, struct bootsector *boot)
319 set_word(boot->dirents, 0);
321 set_word(boot->dirents, Fs->dir_len * (Fs->sector_size / 32));
443 /* As the number of clusters is specified nowhere in the boot sector,
498 static __inline__ void inst_boot_prg(struct bootsector *boot, int offset)
500 memcpy((char *) boot->jump + offset,
504 boot->jump[0] = 0xeb;
505 boot->jump[1] = offset -2;
506 boot->jump[2] = 0x90;
509 boot->jump[0] = 0xe9;
510 boot->jump[1] = offset -3;
511 boot->jump[2] = 0x00;
513 set_word(boot->jump + offset + 20, offset + 24);
525 * the root directory and boot sector(s) */
598 struct Fs_t *Fs, struct bootsector *boot)
610 boot->descr = old_dos[i].media;
624 boot->descr = 0xf8;
626 boot->descr = 0xf0;
657 set_word(boot->fatlen, Fs->fat_len);
663 struct Fs_t *Fs, struct bootsector *boot)
666 boot->descr = 0xf8;
668 boot->descr = 0xf0;
680 set_word(boot->fatlen, 0);
681 set_dword(boot->ext.fat32.bigFat, Fs->fat_len);
775 struct bootsector *boot;
1089 if(SET_GEOM(Fs.Direct, &used_dev, 0xf0, boot)){
1150 /* the boot sector */
1151 boot = (struct bootsector *) buf;
1157 perror("open boot sector");
1164 memset((char *)boot, '\0', Fs.sector_size);
1168 (((char*) boot) + 0x1ae);
1174 set_dword(boot->nhs, used_dev.hidden);
1182 boot->nfat = Fs.num_fat;
1184 set_word(boot->jump + 510, 0xaa55);
1187 set_word(boot->nsect, used_dev.sectors);
1188 set_word(boot->nheads, used_dev.heads);
1196 calc_fs_parameters_32(tot_sectors, &Fs, boot);
1201 set_word(boot->ext.fat32.extFlags,0);
1204 set_word(boot->ext.fat32.fsVersion,fsVersion);
1207 set_dword(boot->ext.fat32.rootCluster, Fs.rootCluster = 2);
1210 set_word(boot->ext.fat32.infoSector, Fs.infoSectorLoc = 1);
1213 /* no backup boot sector */
1214 set_word(boot->ext.fat32.backupBoot, 6);
1216 labelBlock = & boot->ext.fat32.labelBlock;
1220 calc_fs_parameters(&used_dev, tot_sectors, &Fs, boot);
1223 labelBlock = & boot->ext.old.labelBlock;
1250 set_word(boot->secsiz, Fs.sector_size);
1251 boot->clsiz = (unsigned char) Fs.cluster_size;
1252 set_word(boot->nrsvsect, Fs.fat_start);
1254 bootOffset = init_geometry_boot(boot, &used_dev, sectors0,
1258 bootOffset = ((char *) labelBlock) - ((char *) boot) +
1262 boot->banner[4] = 0;
1263 boot->banner[5] = random();
1264 boot->banner[6] = random();
1265 boot->banner[7] = random();
1269 inst_boot_prg(boot, bootOffset);
1274 boot->jump[0] = 0xeb;
1275 boot->jump[1] = 0x80;
1276 boot->jump[2] = 0x90;
1281 boot->descr=mediaDesc;
1284 zero_fat(&Fs, boot->descr);
1296 format_root(&Fs, label, boot);
1297 WRITES((Stream_t *)&Fs, (char *) boot, (mt_off_t) 0, Fs.sector_size);
1299 WRITES((Stream_t *)&Fs, (char *) boot,