View | Details | Raw Unified | Return to bug 243530 | Differences between
and this patch

Collapse All | Expand All

(-)file_not_specified_in_diff (-14 / +63 lines)
Line 1186 Link Here
1186
	int i;
1186
	int i, j;
1187
--
Line 1203 Link Here
1203
#if 1
1204
	if (i > 0) {
1205
	  	j = 0;
1206
		while (enclosure_name[i] && i < 16)
1207
		  	enclosure_name[j++] = enclosure_name[i++];
1208
		while (j < 16)
1209
		  	enclosure_name[j++] = '\0';
1210
	}
1211
#else
Line 1204 Link Here
1204
1213
#endif
1205
--
1214
	
Line 1219 Link Here
1229
#if 1
1230
	if (i > 0) {
1231
	  	j = 0;
1232
		while (enclosure_sn[i] && i < 40)
1233
		  	enclosure_sn[j++] = enclosure_sn[i++];
1234
		while (j < 40)
1235
		  	enclosure_sn[j++] = '\0';
1236
	}
1237
#else
Line 1220 Link Here
1239
#endif
Line 2485 Link Here
2505
static int bmic_is_ext_phy_disk(struct identify_controller *id, int bmic_drive_number)
2506
{
2507
  	if (bmic_supports_big_maps(id))
2508
		return bitisset((uint8_t *) id->big_ext_drive_map, bmic_drive_number, 128); 
2509
	else
2510
		return bitisset((uint8_t *) &id->external_drive_bit_map, bmic_drive_number, 32); 
2511
}
2512
Line 2579 Link Here
2607
	int ext_physical_drive_count = 0;
2608
	int non_disks_count = 0;
Lines 2590-2591 Link Here
2590
	for (i = bmic_next_phy_disk(&id, -1); i != -1; i = bmic_next_phy_disk(&id, i))
2620
	for (i = bmic_next_phy_disk(&id, -1); i != -1; i = bmic_next_phy_disk(&id, i)) {
2591
		physical_drive_count++;
2621
		if (bmic_is_ext_phy_disk(&id, i))
2592
--
2622
			ext_physical_drive_count++;
2623
		else
2624
		  	physical_drive_count++;
2625
	}
2626
	for (i = bmic_next_non_disk(&id, -1); i != -1; i = bmic_next_non_disk(&id, i))
2627
		non_disks_count++;
2628
	
2629
	if (verbose) {
2630
		if (physical_drive_count > 0) {
2631
			printf("  Internal Drives: %d\n", physical_drive_count);
Lines 2593-2594 Link Here
2593
	if (verbose)
2633
			/* For each physical disk i... */
2594
		printf("  Physical drives: %d\n", physical_drive_count);
2634
			for (i = bmic_next_phy_disk(&id, -1); i != -1; i = bmic_next_phy_disk(&id, i))
2595
--
2635
				if (!bmic_is_ext_phy_disk(&id, i))
2636
				  	check_physical_drive(file, fd, controller_lun, &id, i);
2637
		}
2638
		if (ext_physical_drive_count > 0) {
2639
		  	printf("  External Drives: %d\n", ext_physical_drive_count);
Lines 2596-2598 Link Here
2596
	/* For each physical disk i... */
2641
			/* For each external physical disk i... */
2597
	for (i = bmic_next_phy_disk(&id, -1); i != -1; i = bmic_next_phy_disk(&id, i))
2642
			for (i = bmic_next_ext_phy_disk(&id, -1); i != -1; i = bmic_next_ext_phy_disk(&id, i))
2598
		check_physical_drive(file, fd, controller_lun, &id, i);
2643
			  	if (bmic_is_ext_phy_disk(&id, i))
2599
--
2644
				  	check_physical_drive(file, fd, controller_lun, &id, i);
2645
		}
2646
		if (non_disks_count > 0) {
2647
		  	printf("  Non-Compliant Drives: %d\n", non_disks_count);
2648
			
2649
			for (i = bmic_next_non_disk(&id, -1); i != -1; i = bmic_next_non_disk(&id, i))
2650
			  	check_physical_drive(file, fd, controller_lun, &id, i);
2651
		}
2652
	}

Return to bug 243530