diff --git a/userspace/libscap/engine/savefile/converter/converter.cpp b/userspace/libscap/engine/savefile/converter/converter.cpp index ed91382d1ee..7513c9444cb 100644 --- a/userspace/libscap/engine/savefile/converter/converter.cpp +++ b/userspace/libscap/engine/savefile/converter/converter.cpp @@ -27,6 +27,8 @@ limitations under the License. #include #include +extern uint8_t scap_get_size_bytes_from_type(enum ppm_param_type t); + typedef std::shared_ptr safe_scap_evt_t; static inline safe_scap_evt_t safe_scap_evt(scap_evt *evt) { diff --git a/userspace/libscap/engine/savefile/converter/table.cpp b/userspace/libscap/engine/savefile/converter/table.cpp index 39f01ecbdfd..2665627f4f6 100644 --- a/userspace/libscap/engine/savefile/converter/table.cpp +++ b/userspace/libscap/engine/savefile/converter/table.cpp @@ -24,15 +24,17 @@ const std::unordered_map g_conversion_table = { //////////////////////////// // READ //////////////////////////// - {{PPME_SYSCALL_READ_E, 2}, {.action = C_ACTION_STORE}}, - {{PPME_SYSCALL_READ_X, 2}, - {.action = C_ACTION_ADD_PARAMS, - .instr = {{C_INSTR_FROM_ENTER, 0}, {C_INSTR_FROM_ENTER, 1}}}}, + {conversion_key{PPME_SYSCALL_READ_E, 2}, conversion_info{.action = C_ACTION_STORE}}, + {conversion_key{PPME_SYSCALL_READ_X, 2}, + conversion_info{.action = C_ACTION_ADD_PARAMS, + .instr = {{C_INSTR_FROM_ENTER, 0}, {C_INSTR_FROM_ENTER, 1}}}}, //////////////////////////// // PREAD //////////////////////////// - {{PPME_SYSCALL_PREAD_E, 3}, {.action = C_ACTION_STORE}}, - {{PPME_SYSCALL_PREAD_X, 2}, - {.action = C_ACTION_ADD_PARAMS, - .instr = {{C_INSTR_FROM_ENTER, 0}, {C_INSTR_FROM_ENTER, 1}, {C_INSTR_FROM_ENTER, 2}}}}, + {conversion_key{PPME_SYSCALL_PREAD_E, 3}, conversion_info{.action = C_ACTION_STORE}}, + {conversion_key{PPME_SYSCALL_PREAD_X, 2}, + conversion_info{.action = C_ACTION_ADD_PARAMS, + .instr = {{C_INSTR_FROM_ENTER, 0}, + {C_INSTR_FROM_ENTER, 1}, + {C_INSTR_FROM_ENTER, 2}}}}, }; diff --git a/userspace/libscap/engine/savefile/scap_savefile.c b/userspace/libscap/engine/savefile/scap_savefile.c index 19dedf2cae0..214611f06cb 100644 --- a/userspace/libscap/engine/savefile/scap_savefile.c +++ b/userspace/libscap/engine/savefile/scap_savefile.c @@ -2027,7 +2027,7 @@ static int32_t next(struct scap_engine_handle engine, uint16_t *pdevid, uint32_t *pflags) { struct savefile_engine *handle = engine.m_handle; -read_event: +read_event:; int32_t res = next_event_from_file(handle, pevent, pdevid, pflags); // If we fail we don't convert the event. if(res != SCAP_SUCCESS) {