vbox的更動 13141 路徑 trunk/src/bldprogs
- 時間撮記:
- 2008-10-9 下午04:55:54 (16 年 以前)
- 位置:
- trunk/src/bldprogs
- 檔案:
-
- 修改 1 筆資料
- 移動 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/bldprogs/Makefile.kmk
r10187 r13141 23 23 include $(KBUILD_PATH)/subheader.kmk 24 24 25 BLDPROGS += bin2c 25 BLDPROGS += bin2c biossums 26 26 27 bin2c_TEMPLATE = VBOXBLDPROG 27 28 bin2c_SOURCES = bin2c.c 28 29 30 biossums_TEMPLATE = VBOXBLDPROG 31 biossums_SOURCES = biossums.c 32 29 33 include $(KBUILD_PATH)/subfooter.kmk 30 34 -
trunk/src/bldprogs/biossums.c
r13136 r13141 78 78 } 79 79 fclose(stream); 80 #ifdef VBOX 81 modified = 1; 82 if (bios_len <= 0x1000) /* 4k */ 83 bios_len = 0x1000; 84 else if (bios_len <= 0x8000) /* 32k */ 85 bios_len = 0x8000; 86 else if (bios_len <= 0xC000) /* 48k */ 87 bios_len = 0xC000; 88 else if (bios_len > 0xC000) /* 64k */ 89 bios_len = MAX_BIOS_DATA; 90 else if ((bios_len & 0x1FF) != 0) 91 bios_len = (bios_len + 0x200) & ~0x1FF; 92 else 93 modified = 0; 94 #else 80 95 modified = 0; 81 96 if (bios_len < 0x8000) { … … 86 101 modified = 1; 87 102 } 103 #endif 88 104 bios_len_byte = (byte)(bios_len / 512); 89 105 if (bios_len_byte != bios_data[2]) { … … 145 161 } while (cur_val != new_val); 146 162 163 printf("\n"); 164 147 165 if (modified == 1) { 148 #ifdef VBOX149 size_t new_bios_len;150 #endif151 166 if ((stream = fopen( argv[1], "wb")) == NULL) { 152 167 printf("Error opening %s for writing.\n", argv[1]); 153 168 exit(EXIT_FAILURE); 154 169 } 155 #ifdef VBOX 156 if (bios_len <= 0x8000) /* 32k */ 157 new_bios_len = 0x8000; 158 else if (bios_len <= 0xC000) /* 48k */ 159 new_bios_len = 0xC000; 160 else if (bios_len > 0xC000) /* 64k */ 161 new_bios_len = MAX_BIOS_DATA; 162 163 if (fwrite(bios_data, 1, new_bios_len, stream) < new_bios_len) { 164 #else 165 if (fwrite(bios_data, 1, bios_len, stream) < bios_len) { 166 #endif 170 if (fwrite(bios_data, 1, bios_len, stream) < (size_t)bios_len) { 167 171 printf("Error writing %ld KBytes to %s.\n", bios_len / 1024, argv[1]); 168 172 fclose(stream);
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器