![]() |
file magic for mprime save files
From the mprime source code I see that the save files for ECM and P-1 tests have a magic number, so I have made the following entries for /etc/magic so the 'file' program will recognise them:
[code]# # ECM save file eNNNNNNN # 0 ulong 0x1a2b3cd4 Prime95 ECM data, >4 ulong x version %lu, >24 ulong x B1=%lu, >12 ulong x curve #%lu, >8 ulong 0 in stage 1, >>28 ulong x at prime %lu >8 ulong 1 in stage 2, >>32 ulong x at prime %lu # # P-1 save file mNNNNNNN # 0 ulong 0x1a2b3c4d Prime95 P-1 data, >4 ulong x version %lu, >16 ulong x B1=%lu, >28 ulong >0 B2=%lu, >8 ulong 0 in stage 1 >8 ulong 1 in stage 2 >8 ulong 2 complete >8 ulong 3 in stage 1[/code] There is more information in the files that would be nice to be able to extract, such as actual P-1 progress rather than just which stage it is in, but I am not sure how to do it with 'magic' format. This is an example of the output from file: [code]$ file e0001522 e0001522: Prime95 ECM data, version 1, B1=44000000, curve #152, in stage 2, at prime 453577741[/code] |
| All times are UTC. The time now is 07:12. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.