Skip to content

Commit 1287159

Browse files
authored
fix: Change LTOA to LTO10 (#529)
1 parent 1628440 commit 1287159

File tree

7 files changed

+72
-85
lines changed

7 files changed

+72
-85
lines changed

src/libltfs/tape_ops.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ enum {
155155
TC_DC_LTOM8 = 0x5D,
156156
TC_DC_LTO8 = 0x5E,
157157
TC_DC_LTO9 = 0x60,
158-
TC_DC_LTOA = 0x62,
159-
TC_DC_LTOPA = 0x63,
158+
TC_DC_LTO10 = 0x62,
159+
TC_DC_LTOP10 = 0x63,
160160
};
161161

162162
/* Density codes of TS11x0 */

src/tape_drivers/generic/file/filedebug_tc.c

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1409,32 +1409,19 @@ static inline int _sanitize_tape(struct filedebug_data *state)
14091409
ret = -EDEV_MEDIUM_FORMAT_ERROR;
14101410
break;
14111411
}
1412-
} else if (gen == DRIVE_GEN_LTOA) {
1412+
} else if (gen == DRIVE_GEN_LTO10) {
14131413
switch (state->conf.cart_type) {
1414-
case TC_MP_LTOPAD_CART:
1415-
case TC_MP_LTOAD_CART:
1414+
case TC_MP_LTOP10D_CART:
1415+
case TC_MP_LTO10D_CART:
14161416
/* Do nothing */
14171417
break;
14181418
default:
1419-
ltfsmsg(LTFS_INFO, 30086I, "LTOA", state->conf.cart_type);
1419+
ltfsmsg(LTFS_INFO, 30086I, "LTO10", state->conf.cart_type);
14201420
state->unsupported_tape = true;
14211421
ret = -EDEV_MEDIUM_FORMAT_ERROR;
14221422
break;
14231423
}
14241424
}
1425-
else if (gen == DRIVE_GEN_JAG4) {
1426-
switch (state->conf.cart_type) {
1427-
case TC_MP_LTOPAD_CART:
1428-
case TC_MP_LTOAD_CART:
1429-
/* Do nothing */
1430-
break;
1431-
default:
1432-
ltfsmsg(LTFS_INFO, 30086I, "LTOA", state->conf.cart_type);
1433-
state->unsupported_tape = true;
1434-
ret = -EDEV_MEDIUM_FORMAT_ERROR;
1435-
break;
1436-
}
1437-
}
14381425
else if (gen == DRIVE_GEN_JAG4) {
14391426
switch (state->conf.cart_type) {
14401427
case TC_MP_JB:

src/tape_drivers/hp_tape.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ static struct _timeout_tape timeout_lto9[] = {
226226
{-1, -1}
227227
};
228228

229-
static struct _timeout_tape timeout_ltoA[] = {
229+
static struct _timeout_tape timeout_lto10[] = {
230230
{ ERASE, 16320 },
231231
{ FORMAT_MEDIUM, 3180 },
232232
{ LOAD_UNLOAD, 780 },
@@ -346,7 +346,7 @@ static struct _timeout_tape timeout_lto9_hh[] = {
346346
{-1, -1}
347347
};
348348

349-
static struct _timeout_tape timeout_ltoA_hh[] = {
349+
static struct _timeout_tape timeout_lto10_hh[] = {
350350
{ ERASE, 166370 },
351351
{ FORMAT_MEDIUM, 3240 },
352352
{ LOAD_UNLOAD, 960 },
@@ -442,11 +442,11 @@ int hp_tape_init_timeout(struct timeout_tape** table, int type)
442442
case DRIVE_LTO9_HH:
443443
ret = _create_table_tape(table, timeout_lto, timeout_lto9_hh);
444444
break;
445-
case DRIVE_LTOA:
446-
ret = _create_table_tape(table, timeout_lto, timeout_ltoA);
445+
case DRIVE_LTO10:
446+
ret = _create_table_tape(table, timeout_lto, timeout_lto10);
447447
break;
448-
case DRIVE_LTOA_HH:
449-
ret = _create_table_tape(table, timeout_lto, timeout_ltoA_hh);
448+
case DRIVE_LTO10_HH:
449+
ret = _create_table_tape(table, timeout_lto, timeout_lto10_hh);
450450
break;
451451
default:
452452
ret = _create_table_tape(table, timeout_lto, timeout_lto7_hh);

src/tape_drivers/ibm_tape.c

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -193,11 +193,11 @@ DRIVE_DENSITY_SUPPORT_MAP jaguar_drive_density_strict[] = {
193193
};
194194

195195
DRIVE_DENSITY_SUPPORT_MAP lto_drive_density[] = {
196-
/* LTOA */
197-
{ DRIVE_GEN_LTOA, TC_MP_LTOPAD_CART, TC_DC_LTOPA, MEDIUM_PERFECT_MATCH},
198-
{ DRIVE_GEN_LTOA, TC_MP_LTOAD_CART, TC_DC_LTOA, MEDIUM_PERFECT_MATCH},
199-
{ DRIVE_GEN_LTOA, TC_MP_LTOAD_CART, TC_DC_UNKNOWN, MEDIUM_PERFECT_MATCH},
200-
{ DRIVE_GEN_LTOA, TC_MP_LTOPAD_CART, TC_DC_UNKNOWN, MEDIUM_PERFECT_MATCH},
196+
/* LTO10 */
197+
{ DRIVE_GEN_LTO10, TC_MP_LTO10D_CART, TC_DC_LTO10, MEDIUM_PERFECT_MATCH},
198+
{ DRIVE_GEN_LTO10, TC_MP_LTOP10D_CART, TC_DC_LTOP10, MEDIUM_PERFECT_MATCH},
199+
{ DRIVE_GEN_LTO10, TC_MP_LTO10D_CART, TC_DC_UNKNOWN, MEDIUM_PERFECT_MATCH},
200+
{ DRIVE_GEN_LTO10, TC_MP_LTOP10D_CART, TC_DC_UNKNOWN, MEDIUM_PERFECT_MATCH},
201201
/* LTO9 */
202202
{ DRIVE_GEN_LTO9, TC_MP_LTO9D_CART, TC_DC_LTO9, MEDIUM_PERFECT_MATCH},
203203
{ DRIVE_GEN_LTO9, TC_MP_LTO9D_CART, TC_DC_UNKNOWN, MEDIUM_PERFECT_MATCH},
@@ -231,11 +231,11 @@ DRIVE_DENSITY_SUPPORT_MAP lto_drive_density[] = {
231231
};
232232

233233
DRIVE_DENSITY_SUPPORT_MAP lto_drive_density_strict[] = {
234-
/* LTOA */
235-
{ DRIVE_GEN_LTOA, TC_MP_LTOPAD_CART, TC_DC_LTOPA, MEDIUM_PERFECT_MATCH},
236-
{ DRIVE_GEN_LTOA, TC_MP_LTOAD_CART, TC_DC_LTOA, MEDIUM_PERFECT_MATCH},
237-
{ DRIVE_GEN_LTOA, TC_MP_LTOAD_CART, TC_DC_UNKNOWN, MEDIUM_PERFECT_MATCH},
238-
{ DRIVE_GEN_LTOA, TC_MP_LTOPAD_CART, TC_DC_UNKNOWN, MEDIUM_PERFECT_MATCH},
234+
/* LTO10 */
235+
{ DRIVE_GEN_LTO10, TC_MP_LTO10D_CART, TC_DC_LTO10, MEDIUM_PERFECT_MATCH},
236+
{ DRIVE_GEN_LTO10, TC_MP_LTOP10D_CART, TC_DC_LTOP10, MEDIUM_PERFECT_MATCH},
237+
{ DRIVE_GEN_LTO10, TC_MP_LTO10D_CART, TC_DC_UNKNOWN, MEDIUM_PERFECT_MATCH},
238+
{ DRIVE_GEN_LTO10, TC_MP_LTOP10D_CART, TC_DC_UNKNOWN, MEDIUM_PERFECT_MATCH},
239239

240240
/* LTO9 */
241241
{ DRIVE_GEN_LTO9, TC_MP_LTO9D_CART, TC_DC_LTO9, MEDIUM_PERFECT_MATCH},
@@ -260,8 +260,8 @@ DRIVE_DENSITY_SUPPORT_MAP lto_drive_density_strict[] = {
260260
};
261261

262262
const unsigned char supported_cart[] = {
263-
TC_MP_LTOPAD_CART,
264-
TC_MP_LTOAD_CART,
263+
TC_MP_LTOP10D_CART,
264+
TC_MP_LTO10D_CART,
265265
TC_MP_LTO9D_CART,
266266
TC_MP_LTO8D_CART,
267267
TC_MP_LTO7D_CART,
@@ -291,8 +291,8 @@ const unsigned char supported_density[] = {
291291
TC_DC_JAG5A,
292292
TC_DC_JAG5,
293293
TC_DC_JAG4,
294-
TC_DC_LTOPA,
295-
TC_DC_LTOA,
294+
TC_DC_LTOP10,
295+
TC_DC_LTO10,
296296
TC_DC_LTO9,
297297
TC_DC_LTO8,
298298
TC_DC_LTOM8,
@@ -334,10 +334,10 @@ struct supported_device *ibm_supported_drives[] = {
334334
TAPEDRIVE( IBM_VENDOR_ID, "ULTRIUM-HH9", DRIVE_LTO9_HH, "[ULTRIUM-HH9]" ), /* IBM Ultrium Gen 9 Half-High */
335335
TAPEDRIVE( IBM_VENDOR_ID, "ULT3580-HH9", DRIVE_LTO9_HH, "[ULT3580-HH9]" ), /* IBM Ultrium Gen 9 Half-High */
336336
TAPEDRIVE( IBM_VENDOR_ID, "HH LTO Gen 9", DRIVE_LTO9_HH, "[HH LTO Gen 9]" ), /* IBM Ultrium Gen 9 Half-High */
337-
TAPEDRIVE( IBM_VENDOR_ID, "ULTRIUM-TDA", DRIVE_LTOA, "[ULTRIUM-TDA]" ), /* IBM Ultrium Gen A */
338-
TAPEDRIVE( IBM_VENDOR_ID, "ULT3580-TDA", DRIVE_LTOA, "[ULT3580-TDA]"), /* IBM Ultrium Gen A */
339-
TAPEDRIVE( IBM_VENDOR_ID, "ULTRIUM-HHA", DRIVE_LTOA_HH, "[ULTRIUM-HHA]"), /* IBM Ultrium Gen A Half-High */
340-
TAPEDRIVE( IBM_VENDOR_ID, "ULT3580-HHA", DRIVE_LTOA_HH, "[ULT3580-HHA]"), /* IBM Ultrium Gen A Half-High */
337+
TAPEDRIVE( IBM_VENDOR_ID, "ULTRIUM-TDA", DRIVE_LTO10, "[ULTRIUM-TDA]" ), /* IBM Ultrium Gen A */
338+
TAPEDRIVE( IBM_VENDOR_ID, "ULT3580-TDA", DRIVE_LTO10, "[ULT3580-TDA]"), /* IBM Ultrium Gen A */
339+
TAPEDRIVE( IBM_VENDOR_ID, "ULTRIUM-HHA", DRIVE_LTO10_HH,"[ULTRIUM-HHA]"), /* IBM Ultrium Gen A Half-High */
340+
TAPEDRIVE( IBM_VENDOR_ID, "ULT3580-HHA", DRIVE_LTO10_HH,"[ULT3580-HHA]"), /* IBM Ultrium Gen A Half-High */
341341
TAPEDRIVE( IBM_VENDOR_ID, "03592E07", DRIVE_TS1140, "[03592E07]" ), /* IBM TS1140 */
342342
TAPEDRIVE( IBM_VENDOR_ID, "03592E08", DRIVE_TS1150, "[03592E08]" ), /* IBM TS1150 */
343343
TAPEDRIVE( IBM_VENDOR_ID, "0359255F", DRIVE_TS1155, "[0359255F]" ), /* IBM TS1155 */
@@ -367,9 +367,9 @@ struct supported_device *usb_supported_drives[] = {
367367
TAPEDRIVE( IBM_VENDOR_ID, "ULT3580-TD9", DRIVE_LTO9, "[ULT3580-TD9]" ), /* IBM Ultrium Gen 9 */
368368
TAPEDRIVE( IBM_VENDOR_ID, "ULTRIUM-HH9", DRIVE_LTO9_HH, "[ULTRIUM-HH9]" ), /* IBM Ultrium Gen 9 Half-High */
369369
TAPEDRIVE( IBM_VENDOR_ID, "ULT3580-HH9", DRIVE_LTO9_HH, "[ULT3580-HH9]" ), /* IBM Ultrium Gen 9 Half-High */
370-
TAPEDRIVE( IBM_VENDOR_ID, "ULT3580-TDA", DRIVE_LTOA, "[ULT3580-TDA]"), /* IBM Ultrium Gen A */
371-
TAPEDRIVE( IBM_VENDOR_ID, "ULTRIUM-HHA", DRIVE_LTOA_HH, "[ULTRIUM-HHA]" ), /* IBM Ultrium Gen A */
372-
TAPEDRIVE( IBM_VENDOR_ID, "ULT3580-HHA", DRIVE_LTOA_HH, "[ULT3580-HHA]" ), /* IBM Ultrium Gen A Half-High */
370+
TAPEDRIVE( IBM_VENDOR_ID, "ULT3580-TDA", DRIVE_LTO10, "[ULT3580-TDA]"), /* IBM Ultrium Gen A */
371+
TAPEDRIVE( IBM_VENDOR_ID, "ULTRIUM-HHA", DRIVE_LTO10_HH,"[ULTRIUM-HHA]" ), /* IBM Ultrium Gen A */
372+
TAPEDRIVE( IBM_VENDOR_ID, "ULT3580-HHA", DRIVE_LTO10_HH,"[ULT3580-HHA]" ), /* IBM Ultrium Gen A Half-High */
373373
/* End of supported_devices */
374374
NULL
375375
};
@@ -611,7 +611,7 @@ static struct _timeout_tape timeout_lto9[] = {
611611
{-1, -1}
612612
};
613613

614-
static struct _timeout_tape timeout_ltoA[] = {
614+
static struct _timeout_tape timeout_lto10[] = {
615615
{ ERASE, 16320 },
616616
{ FORMAT_MEDIUM, 3180 },
617617
{ LOAD_UNLOAD, 780 },
@@ -731,7 +731,7 @@ static struct _timeout_tape timeout_lto9_hh[] = {
731731
{-1, -1}
732732
};
733733

734-
static struct _timeout_tape timeout_ltoA_hh[] = {
734+
static struct _timeout_tape timeout_lto10_hh[] = {
735735
{ ERASE, 166370 },
736736
{ FORMAT_MEDIUM, 3240 },
737737
{ LOAD_UNLOAD, 960 },
@@ -965,11 +965,11 @@ int ibm_tape_init_timeout(struct timeout_tape** table, int type)
965965
case DRIVE_LTO9_HH:
966966
ret = _create_table_tape(table, timeout_lto, timeout_lto9_hh);
967967
break;
968-
case DRIVE_LTOA:
969-
ret = _create_table_tape(table, timeout_lto, timeout_ltoA);
968+
case DRIVE_LTO10:
969+
ret = _create_table_tape(table, timeout_lto, timeout_lto10);
970970
break;
971-
case DRIVE_LTOA_HH:
972-
ret = _create_table_tape(table, timeout_lto, timeout_ltoA_hh);
971+
case DRIVE_LTO10_HH:
972+
ret = _create_table_tape(table, timeout_lto, timeout_lto10_hh);
973973
break;
974974
case DRIVE_TS1140:
975975
ret = _create_table_tape(table, timeout_11x0, timeout_1140);
@@ -1058,7 +1058,7 @@ static inline unsigned char _assume_cartridge_type(char product, char btype)
10581058
ctype = TC_MP_LTO9D_CART;
10591059
break;
10601060
case 'A':
1061-
ctype = TC_MP_LTOAD_CART;
1061+
ctype = TC_MP_LTO10D_CART;
10621062
break;
10631063
default:
10641064
break;
@@ -1075,7 +1075,7 @@ static inline unsigned char _assume_cartridge_type(char product, char btype)
10751075
else if (product == 'P') {
10761076
switch (btype) {
10771077
case 'A':
1078-
ctype = TC_MP_LTOPAD_CART;
1078+
ctype = TC_MP_LTOP10D_CART;
10791079
break;
10801080
default:
10811081
break;
@@ -1119,10 +1119,10 @@ char* ibm_tape_assume_cart_name(unsigned char type)
11191119
case TC_MP_LTO9D_CART:
11201120
name = "L9";
11211121
break;
1122-
case TC_MP_LTOAD_CART:
1122+
case TC_MP_LTO10D_CART:
11231123
name = "LA";
11241124
break;
1125-
case TC_MP_LTOPAD_CART:
1125+
case TC_MP_LTOP10D_CART:
11261126
name = "PA";
11271127
break;
11281128
case TC_MP_JB:

src/tape_drivers/quantum_tape.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ static struct _timeout_tape timeout_lto9_hh[] = {
246246
{-1, -1}
247247
};
248248

249-
static struct _timeout_tape timeout_ltoA_hh[] = {
249+
static struct _timeout_tape timeout_lto10_hh[] = {
250250
{ ERASE, 166370 },
251251
{ FORMAT_MEDIUM, 3240 },
252252
{ LOAD_UNLOAD, 960 },
@@ -327,8 +327,8 @@ int quantum_tape_init_timeout(struct timeout_tape** table, int type)
327327
case DRIVE_LTO9_HH:
328328
ret = _create_table_tape(table, timeout_lto, timeout_lto9_hh);
329329
break;
330-
case DRIVE_LTOA_HH:
331-
ret = _create_table_tape(table, timeout_lto, timeout_ltoA_hh);
330+
case DRIVE_LTO10_HH:
331+
ret = _create_table_tape(table, timeout_lto, timeout_lto10_hh);
332332
break;
333333
default:
334334
ret = _create_table_tape(table, timeout_lto, timeout_lto7_hh);

src/tape_drivers/tape_drivers.h

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,8 @@ enum {
193193
DRIVE_LTO8_HH = 0x2208, /* Ultrium Gen 8 Half-High */
194194
DRIVE_LTO9 = 0x2109, /* Ultrium Gen 9 */
195195
DRIVE_LTO9_HH = 0x2209, /* Ultrium Gen 9 Half-High */
196-
DRIVE_LTOA = 0x210A, /* Ultrium Gen A */
197-
DRIVE_LTOA_HH = 0x220A, /* Ultrium Gen A Half-High */
196+
DRIVE_LTO10 = 0x210A, /* Ultrium Gen 10 */
197+
DRIVE_LTO10_HH = 0x220A, /* Ultrium Gen 10 Half-High */
198198
DRIVE_TS1140 = 0x1104, /* TS1140 */
199199
DRIVE_TS1150 = 0x1105, /* TS1150 */
200200
DRIVE_TS1155 = 0x5105, /* TS1155 */
@@ -209,7 +209,7 @@ enum {
209209
DRIVE_GEN_LTO7 = 0x2007,
210210
DRIVE_GEN_LTO8 = 0x2008,
211211
DRIVE_GEN_LTO9 = 0x2009,
212-
DRIVE_GEN_LTOA = 0x200A,
212+
DRIVE_GEN_LTO10 = 0x200A,
213213
DRIVE_GEN_JAG4 = 0x1004,
214214
DRIVE_GEN_JAG5 = 0x1005,
215215
DRIVE_GEN_JAG5A = 0x5005,
@@ -219,25 +219,25 @@ enum {
219219

220220
/* LTO cartridge type in mode page header */
221221
enum {
222-
TC_MP_LTO1D_CART = 0x18, /* LTO1 Data cartridge */
223-
TC_MP_LTO2D_CART = 0x28, /* LTO2 Data cartridge */
224-
TC_MP_LTO3D_CART = 0x38, /* LTO3 Data cartridge */
225-
TC_MP_LTO4D_CART = 0x48, /* LTO4 Data cartridge */
226-
TC_MP_LTO5D_CART = 0x58, /* LTO5 Data cartridge */
227-
TC_MP_LTO6D_CART = 0x68, /* LTO6 Data cartridge */
228-
TC_MP_LTO7D_CART = 0x78, /* LTO7 Data cartridge */
229-
TC_MP_LTO8D_CART = 0x88, /* LTO8 Data cartridge */
230-
TC_MP_LTO9D_CART = 0x98, /* LTO9 Data cartridge */
231-
TC_MP_LTOAD_CART = 0xA8, /* LTOA Data cartridge */
232-
TC_MP_LTOPAD_CART = 0xA9, /* LTOPA Data cartridge */
233-
TC_MP_LTO3W_CART = 0x3C, /* LTO3 WORM cartridge */
234-
TC_MP_LTO4W_CART = 0x4C, /* LTO4 WORM cartridge */
235-
TC_MP_LTO5W_CART = 0x5C, /* LTO5 WORM cartridge */
236-
TC_MP_LTO6W_CART = 0x6C, /* LTO6 WORM cartridge */
237-
TC_MP_LTO7W_CART = 0x7C, /* LTO7 WORM cartridge */
238-
TC_MP_LTO8W_CART = 0x8C, /* LTO8 WORM cartridge */
239-
TC_MP_LTO9W_CART = 0x9C, /* LTO9 WORM cartridge */
240-
TC_MP_LTOAW_CART = 0xAC, /* LTOA WORM cartridge */
222+
TC_MP_LTO1D_CART = 0x18, /* LTO1 Data cartridge */
223+
TC_MP_LTO2D_CART = 0x28, /* LTO2 Data cartridge */
224+
TC_MP_LTO3D_CART = 0x38, /* LTO3 Data cartridge */
225+
TC_MP_LTO4D_CART = 0x48, /* LTO4 Data cartridge */
226+
TC_MP_LTO5D_CART = 0x58, /* LTO5 Data cartridge */
227+
TC_MP_LTO6D_CART = 0x68, /* LTO6 Data cartridge */
228+
TC_MP_LTO7D_CART = 0x78, /* LTO7 Data cartridge */
229+
TC_MP_LTO8D_CART = 0x88, /* LTO8 Data cartridge */
230+
TC_MP_LTO9D_CART = 0x98, /* LTO9 Data cartridge */
231+
TC_MP_LTO10D_CART = 0xA8, /* LTO10 Data cartridge */
232+
TC_MP_LTOP10D_CART = 0xA9, /* LTOP10 Data cartridge */
233+
TC_MP_LTO3W_CART = 0x3C, /* LTO3 WORM cartridge */
234+
TC_MP_LTO4W_CART = 0x4C, /* LTO4 WORM cartridge */
235+
TC_MP_LTO5W_CART = 0x5C, /* LTO5 WORM cartridge */
236+
TC_MP_LTO6W_CART = 0x6C, /* LTO6 WORM cartridge */
237+
TC_MP_LTO7W_CART = 0x7C, /* LTO7 WORM cartridge */
238+
TC_MP_LTO8W_CART = 0x8C, /* LTO8 WORM cartridge */
239+
TC_MP_LTO9W_CART = 0x9C, /* LTO9 WORM cartridge */
240+
TC_MP_LTO10W_CART = 0xAC, /* LTO10 WORM cartridge */
241241
};
242242

243243
/* Enterprise cartridge type in mode page header */

src/tape_drivers/vendor_compat.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -353,11 +353,11 @@ unsigned char assume_cart_type(const unsigned char dc)
353353
case TC_DC_LTO9:
354354
cart = TC_MP_LTO9D_CART;
355355
break;
356-
case TC_DC_LTOA:
357-
cart = TC_MP_LTOAD_CART;
356+
case TC_DC_LTO10:
357+
cart = TC_MP_LTO10D_CART;
358358
break;
359-
case TC_DC_LTOPA:
360-
cart = TC_MP_LTOPAD_CART;
359+
case TC_DC_LTOP10:
360+
cart = TC_MP_LTOP10D_CART;
361361
break;
362362
default:
363363
// Do nothing

0 commit comments

Comments
 (0)