@@ -197,6 +197,13 @@ function favoriteArch(archs) {
197
197
return archs [ 0 ]
198
198
}
199
199
200
+ function realTag ( arch , bits , abi , tag ) {
201
+ // Convert special "latest" tag to real tag, leave others alone
202
+ if ( tag === 'latest' )
203
+ return db [ arch ] [ bits ] [ abi ] [ 'latest' ] [ 'real_tag' ]
204
+ return tag
205
+ }
206
+
200
207
function fillArchOptions ( archs ) {
201
208
clearOptions ( archSelectEl )
202
209
archs . forEach ( ( [ arch , bits , abi ] ) => {
@@ -312,7 +319,7 @@ function toggleCollapseColumn(e) {
312
319
localStorage . setItem ( 'collapsedColumns' , tableEl . dataset . collapse )
313
320
}
314
321
315
- function fillRow ( row , tag , sc , maxArgs ) {
322
+ function fillRow ( row , realTag , sc , maxArgs ) {
316
323
const cells = [
317
324
document . createElement ( 'td' ) , document . createElement ( 'td' ) ,
318
325
document . createElement ( 'td' ) , document . createElement ( 'td' ) ,
@@ -349,7 +356,7 @@ function fillRow(row, tag, sc, maxArgs) {
349
356
const link = document . createElement ( 'a' )
350
357
link . target = '_blank'
351
358
link . title = 'View in Bootlin Elixir cross referencer'
352
- link . href = `https://elixir.bootlin.com/linux/${ tag } /source/${ sc . file } #L${ sc . line } `
359
+ link . href = `https://elixir.bootlin.com/linux/${ realTag } /source/${ sc . file } #L${ sc . line } `
353
360
link . textContent = `${ sc . file } :${ sc . line } `
354
361
loc . appendChild ( link )
355
362
}
@@ -444,7 +451,7 @@ function fillRow(row, tag, sc, maxArgs) {
444
451
}
445
452
}
446
453
447
- function fillTable ( syscallTable , tag ) {
454
+ function fillTable ( syscallTable , realTag ) {
448
455
const numReg = syscallTable . kernel . abi . calling_convention . syscall_nr
449
456
const argRegs = syscallTable . kernel . abi . calling_convention . parameters
450
457
const maxArgs = syscallTable . syscalls . reduce ( ( acc , sc ) => Math . max ( acc , sc . signature ?. length || 0 ) , 0 )
@@ -490,7 +497,7 @@ function fillTable(syscallTable, tag) {
490
497
491
498
for ( const sc of syscallTable . syscalls ) {
492
499
const row = document . createElement ( 'tr' )
493
- fillRow ( row , tag , sc , maxArgs )
500
+ fillRow ( row , realTag , sc , maxArgs )
494
501
tableEl . appendChild ( row )
495
502
}
496
503
@@ -502,11 +509,12 @@ function toggleCompactSignature() {
502
509
if ( updateInProgress )
503
510
return
504
511
505
- const tag = getSelection ( ) . pop ( )
512
+ const selection = getSelection ( )
513
+ const [ arch , bits , abi , tag ] = selection
506
514
compactSignature = ! compactSignature
507
515
localStorage . setItem ( 'compactSignature' , compactSignature )
508
516
// Could be optimized... but I could also not care less for now
509
- fillTable ( currentSyscallTable , tag )
517
+ fillTable ( currentSyscallTable , realTag ( arch , bits , abi , tag ) )
510
518
}
511
519
512
520
async function update ( pushHistoryState ) {
@@ -516,7 +524,7 @@ async function update(pushHistoryState) {
516
524
const newTitle = `Linux syscall table: ${ tag } , ${ getArchSelectionText ( ) } `
517
525
518
526
currentSyscallTable = await fetchSyscallTable ( arch , bits , abi , tag )
519
- fillTable ( currentSyscallTable , tag )
527
+ fillTable ( currentSyscallTable , realTag ( arch , bits , abi , tag ) )
520
528
521
529
// Some stats at the bottom of the table
522
530
const n_syscalls = currentSyscallTable . syscalls . length
0 commit comments