[stgt] [PATCH 2/8] ssc: fix the alignement and size of struct MAM

FUJITA Tomonori fujita.tomonori at lab.ntt.co.jp
Sun Oct 12 06:38:47 CEST 2008


Putting some padding to struct MAM to make sure that the on-disk
structures on various architectures are identical.

Signed-off-by: FUJITA Tomonori <fujita.tomonori at lab.ntt.co.jp>
---
 usr/ssc.h |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/usr/ssc.h b/usr/ssc.h
index 42b8a53..308c8e5 100644
--- a/usr/ssc.h
+++ b/usr/ssc.h
@@ -10,16 +10,20 @@
  */
 struct MAM {
 	uint32_t tape_fmt_version;
+	uint32_t __pad1;
 
 	uint64_t remaining_capacity;
 	uint64_t max_capacity;
 	uint64_t TapeAlert;
 	uint64_t load_count;
 	uint64_t MAM_space_remaining;
+
 	uint8_t assigning_organization_1[8];
 	uint8_t formatted_density_code;
+	uint8_t __pad2[5];
 	uint8_t initialization_count[2];
 	uint8_t dev_make_serial_last_load[4][40];
+
 	uint64_t written_in_medium_life;
 	uint64_t read_in_medium_life;
 	uint64_t written_in_last_load;
@@ -31,16 +35,20 @@ struct MAM {
 	uint32_t medium_width;
 	uint8_t assigning_organization_2[8];
 	uint8_t medium_density_code;
+	uint8_t __pad3[7];
 	uint8_t medium_manufacture_date[8];
 	uint64_t MAM_capacity;
 	uint8_t medium_type;
+	uint8_t __pad4;
 	uint16_t medium_type_information;
+	uint8_t __pad5[4];
 
 	uint8_t application_vendor[8];
 	uint8_t application_name[32];
 	uint8_t application_version[8];
 	uint8_t user_medium_text_label[160];
 	uint8_t date_time_last_written[12];
+	uint8_t __pad6[3];
 	uint8_t localization_identifier;
 	uint8_t barcode[32];
 	uint8_t owning_host_textual_name[80];
@@ -49,6 +57,7 @@ struct MAM {
 	uint8_t vendor_unique[256];
 
 	uint8_t dirty;
+	uint8_t __reserved[7];
 };
 
 struct ssc_info {
-- 
1.5.6.5

--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



More information about the stgt mailing list