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

Collapse All | Expand All

(-)cciss_vol_status.c (-7 / +9 lines)
Lines 23-28 Link Here
23
#include <config.h>
23
#include <config.h>
24
#endif
24
#endif
25
25
26
#include <arpa/inet.h>
27
26
#define VERSION_NUMBER PACKAGE_VERSION
28
#define VERSION_NUMBER PACKAGE_VERSION
27
29
28
#include <stdio.h>
30
#include <stdio.h>
Lines 637-643 Link Here
637
	int big_map_support;
639
	int big_map_support;
638
	int drives_per_scsi_bus;
640
	int drives_per_scsi_bus;
639
641
640
	big_map_support = (id->controller_flags && (1<<7));
642
	big_map_support = (id->controller_flags & (1<<7));
641
	drives_per_scsi_bus = id->drives_per_scsi_bus;;
643
	drives_per_scsi_bus = id->drives_per_scsi_bus;;
642
644
643
	/* if no big drive map support, & zero devices per scsi bus */
645
	/* if no big drive map support, & zero devices per scsi bus */
Lines 683-689 Link Here
683
		copy_drive_field(model, device_data->drive_model, sizeof(device_data->drive_model));
685
		copy_drive_field(model, device_data->drive_model, sizeof(device_data->drive_model));
684
		copy_drive_field(serial_no, device_data->drive_serial_no, sizeof(device_data->drive_serial_no));
686
		copy_drive_field(serial_no, device_data->drive_serial_no, sizeof(device_data->drive_serial_no));
685
		copy_drive_field(fw_rev, device_data->drive_fw_rev, sizeof(device_data->drive_fw_rev));
687
		copy_drive_field(fw_rev, device_data->drive_fw_rev, sizeof(device_data->drive_fw_rev));
686
		sprintf(tail, " connector %c%c box %d bay %d %40s %40s %8s",
688
		sprintf(tail, " connector %c%c box %d bay %-2d %40s %40s %8s",
687
			device_data->phys_connector[0],
689
			device_data->phys_connector[0],
688
			device_data->phys_connector[1],
690
			device_data->phys_connector[1],
689
			device_data->phys_box_on_bus,
691
			device_data->phys_box_on_bus,
Lines 1001-1007 Link Here
1001
	struct identify_physical_device device_data;
1003
	struct identify_physical_device device_data;
1002
	char location[300];
1004
	char location[300];
1003
1005
1004
	big_map_support = (id->controller_flags && (1<<7));
1006
	big_map_support = (id->controller_flags & (1<<7));
1005
	drives_per_scsi_bus = id->drives_per_scsi_bus;;
1007
	drives_per_scsi_bus = id->drives_per_scsi_bus;;
1006
1008
1007
	/* if no big drive map support, & zero devices per scsi bus */
1009
	/* if no big drive map support, & zero devices per scsi bus */
Lines 1098-1104 Link Here
1098
			break;
1100
			break;
1099
		case 1: sprintf(raid_level, "RAID 4");
1101
		case 1: sprintf(raid_level, "RAID 4");
1100
			break;
1102
			break;
1101
		case 2: sprintf(raid_level, "RAID 1");
1103
		case 2: sprintf(raid_level, "RAID 1(1+0)");
1102
			break;
1104
			break;
1103
		case 3: sprintf(raid_level, "RAID 5");
1105
		case 3: sprintf(raid_level, "RAID 5");
1104
			break;
1106
			break;
Lines 1204-1210 Link Here
1204
	/* Eg. 6400 with internal card cage gives back bogus info */
1206
	/* Eg. 6400 with internal card cage gives back bogus info */
1205
	/* for me for the serial number. */
1207
	/* for me for the serial number. */
1206
	strncpy(enclosure_sn, bus_param->chassis_sn, 40);
1208
	strncpy(enclosure_sn, bus_param->chassis_sn, 40);
1207
	enclosure_sn[41] = '\0';
1209
	enclosure_sn[40] = '\0';
1208
	for (i = 40 - 1; i > 0; i--)
1210
	for (i = 40 - 1; i > 0; i--)
1209
		if (enclosure_sn[i] == ' ') {
1211
		if (enclosure_sn[i] == ' ') {
1210
			enclosure_sn[i] = '\0';
1212
			enclosure_sn[i] = '\0';
Lines 2291-2297 Link Here
2291
		return;
2293
		return;
2292
2294
2293
	printf("%35s: %hu MiB\n", "Total cache memory", cache_config->total_memory_size);
2295
	printf("%35s: %hu MiB\n", "Total cache memory", cache_config->total_memory_size);
2294
	printf("%35s: %d% Read / %d% Write\n", "Cache Ratio", cache_config->percent_read_cache, cache_config->percent_write_cache);
2296
	printf("%35s: %d%% Read / %d%% Write\n", "Cache Ratio", cache_config->percent_read_cache, cache_config->percent_write_cache);
2295
	printf("%35s: %hu MiB\n", "Read cache memory", cache_config->mem_for_read_cache);
2297
	printf("%35s: %hu MiB\n", "Read cache memory", cache_config->mem_for_read_cache);
2296
	printf("%35s: %hu MiB\n", "Write cache memory", cache_config->mem_for_write_cache);
2298
	printf("%35s: %hu MiB\n", "Write cache memory", cache_config->mem_for_write_cache);
2297
	printf("%35s: %s\n", "Write cache enabled",
2299
	printf("%35s: %s\n", "Write cache enabled",
Lines 2477-2483 Link Here
2477
2479
2478
static inline int bmic_supports_big_maps(struct identify_controller *id)
2480
static inline int bmic_supports_big_maps(struct identify_controller *id)
2479
{
2481
{
2480
	return id->controller_flags && (1<<7);
2482
	return id->controller_flags & (1<<7);
2481
}
2483
}
2482
2484
2483
static int bmic_next_disk_bits(uint8_t *bits, int bitmapsize, int disk)
2485
static int bmic_next_disk_bits(uint8_t *bits, int bitmapsize, int disk)

Return to bug 246357