Changeset 201
- Timestamp:
- 01/26/07 10:55:51 (2 years ago)
- Files:
-
- trunk/client/src_revoboot/bios.c (modified) (2 diffs)
- trunk/client/src_revoboot/builtins_lbs.c (modified) (3 diffs)
- trunk/client/src_revoboot/builtins_lbs.h (modified) (1 diff)
- trunk/client/src_revoboot/common.c (modified) (1 diff)
- trunk/client/src_revoboot/config.h (modified) (1 diff)
- trunk/client/src_revoboot/pxe.size (modified) (1 diff)
- trunk/client/src_revoboot/revoboot.pxe (modified) (previous)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/client/src_revoboot/bios.c
r99 r201 187 187 if (! err) 188 188 { 189 unsigned int t_sect,max_sect,min_sect;190 191 189 /* Set the LBA flag. */ 192 190 geometry->flags = BIOSDISK_FLAG_LBA_EXTENSION; … … 203 201 change the type of TOTAL_SECTORS to unsigned long 204 202 long. */ 205 206 max_sect= drp.sectors * drp.heads * (drp.cylinders+1); 207 min_sect= drp.total_sectors; 208 209 #ifdef DEBUG 210 printf("Start with : min = %d , max = %d\n",min_sect,max_sect); 211 #endif 212 213 if (max_sect>min_sect) 214 { 215 while (min_sect != max_sect) 216 { 217 struct disk_address_packet 218 { 219 unsigned char length; 220 unsigned char reserved; 221 unsigned short blocks; 222 unsigned long buffer; 223 unsigned long long block; 224 } dap; 225 226 t_sect=(max_sect+min_sect)/2; 227 if (t_sect == min_sect) t_sect=max_sect; // max=min+1 => last test with max 228 229 dap.length = sizeof (dap); 230 dap.block = t_sect; 231 dap.blocks = 1; 232 dap.reserved = 0; 233 dap.buffer = SCRATCHSEG << 16; 234 #ifdef DEBUG 235 grub_printf("Testing sector %d (%d-%d) : ",t_sect,min_sect,max_sect); 236 #endif 237 err = biosdisk_int13_extensions (0x42, drive, &dap); 238 #ifdef DEBUG 239 if (err) grub_printf("Failed\n"); 240 else grub_printf("OK\n"); 241 #endif 242 243 if (err) max_sect=(t_sect-1); 244 else min_sect=t_sect; 245 } 246 total_sectors= min_sect+1; 247 } 203 204 if (drp.total_sectors) 205 total_sectors = drp.total_sectors & ~0L; 248 206 else 249 total_sectors= min_sect; 250 251 207 /* Some buggy BIOSes doesn't return the total sectors 208 correctly but returns zero. So if it is zero, compute 209 it by C/H/S returned by the LBA BIOS call. */ 210 total_sectors = drp.cylinders * drp.heads * drp.sectors; 252 211 } 253 212 } trunk/client/src_revoboot/builtins_lbs.c
r108 r201 55 55 int new_get (char *file, int sect, int *endsect, int table); 56 56 57 /* to force a new inventory */ 58 extern int done_inventory; 57 59 58 60 void … … 273 275 continue; 274 276 /* verify that the disk is readable */ 275 276 277 if (biosdisk (BIOSDISK_READ, current_drive, &geom, 0, 1, SCRATCHADDR)) 277 278 { … … 1347 1348 udp_close (); 1348 1349 1350 done_inventory = 0; 1349 1351 init_bios_info(); 1350 1352 trunk/client/src_revoboot/builtins_lbs.h
r99 r201 21 21 int identifyauto_func (char *arg, int flags); 22 22 int kbdfr_func (char *arg, int flags); 23 24 /* macros */ 25 #define MIN(X,Y) ((X) < (Y) ? (X) : (Y)) 23 26 24 27 /* variables */ trunk/client/src_revoboot/common.c
r108 r201 411 411 lbsname[i] = udp_packet_r[i]; 412 412 } 413 lbsname[sz] = 0; 414 lbsname[31] = 0; 413 lbsname[MIN(sz,31)] = 0; 415 414 } 416 415 udp_close(); trunk/client/src_revoboot/config.h
r108 r201 10 10 11 11 #define PACKAGE "LinboxBootLoader" 12 #define VERSION "1.3 0"12 #define VERSION "1.31" trunk/client/src_revoboot/pxe.size
r108 r201 1 95 8361 95676
