7 #include <magic_analysis.h>
12 #include <st/os_callback.h>
13 #include <st/state_transfer.h>
15 /* Data transfer and adjustment functions */
16 #if !ST_ASSUME_RAW_COPY_BEFORE_TRANSFER
17 PRIVATE
int deallocate_nonxferred_dsentries(struct _magic_dsentry
*first_dsentry
, st_counterparts_t
*counterparts
);
19 PRIVATE
void deallocate_local_dsentry(struct _magic_dsentry
*local_dsentry
);
20 PRIVATE
int allocate_local_dsentry(st_init_info_t
*info
, struct _magic_dsindex
*local_dsindex
, int num_elements
, int is_type_mismatch
, const union __alloc_flags
*p_alloc_flags
, struct _magic_dsentry
** local_dsentry_ptr
, struct _magic_dsentry
*cached_dsentry
, void *ptr
);
22 PRIVATE
int check_unpaired_sentry(st_init_info_t
*info
, struct _magic_sentry
* cached_sentry
);
23 PRIVATE
int transfer_data_sentry(st_init_info_t
*info
, struct _magic_sentry
* cached_sentry
);
24 PRIVATE
int transfer_data_selement(_magic_selement_t
*selement
, _magic_sel_analyzed_t
*sel_analyzed
, _magic_sel_stats_t
*sel_stats
, void *cb_args
);
25 PRIVATE
int lookup_trg_info(_magic_selement_t
*selement
, _magic_sel_analyzed_t
*sel_analyzed
, _magic_sel_stats_t
*sel_stats
, struct st_cb_info
*cb_info
,
26 _magic_selement_t
*cached_trg_selement
, _magic_selement_t
*local_trg_selement
);
27 PRIVATE INLINE
void st_set_transfer_status(int status_flags
, int status_op
,
28 struct _magic_sentry
*cached_sentry
, struct _magic_function
*cached_function
);
29 PRIVATE INLINE
void st_map_selement(_magic_selement_t
*cached_selement
, _magic_selement_t
*local_selement
, struct st_cb_info
*cb_info
, int is_trg_mapping
);
31 /* Buffer allocation */
32 PRIVATE
void *persistent_mmap(__MA_ARGS__ st_init_info_t
*info
, void *start
, size_t length
, int prot
, int flags
, int fd
, off_t offset
, struct _magic_dsentry
*dsentry
);
34 #endif /* ST_PRIVATE_H */