Lines 305-319
static void remember_jump_position(struct fdi_context *fdi_ctx)
Link Here
|
305 |
static void set_jump_position(struct fdi_context *fdi_ctx) |
305 |
static void set_jump_position(struct fdi_context *fdi_ctx) |
306 |
{ |
306 |
{ |
307 |
off_t offset; |
307 |
off_t offset; |
|
|
308 |
u_int32_t offset32; |
308 |
|
309 |
|
309 |
if (fdi_ctx->depth <= 0) |
310 |
if (fdi_ctx->depth <= 0) |
310 |
DIE(("Rule depth underrun")); |
311 |
DIE(("Rule depth underrun")); |
311 |
|
312 |
|
312 |
fdi_ctx->depth--; |
313 |
fdi_ctx->depth--; |
313 |
offset = RULES_ROUND(lseek(fdi_ctx->cache_fd, 0, SEEK_END)); |
314 |
offset = RULES_ROUND(lseek(fdi_ctx->cache_fd, 0, SEEK_END)); |
|
|
315 |
offset32 = (u_int32_t)offset; |
314 |
pad32_write(fdi_ctx->cache_fd, |
316 |
pad32_write(fdi_ctx->cache_fd, |
315 |
fdi_ctx->match_at_depth[fdi_ctx->depth] + offsetof(struct rule, jump_position), |
317 |
fdi_ctx->match_at_depth[fdi_ctx->depth] + offsetof(struct rule, jump_position), |
316 |
&offset, sizeof(fdi_ctx->rule.jump_position)); |
318 |
&offset32, sizeof(fdi_ctx->rule.jump_position)); |
317 |
|
319 |
|
318 |
if (haldc_verbose) |
320 |
if (haldc_verbose) |
319 |
HAL_INFO(("modify rule=0x%08x, set jump to 0x%08x", |
321 |
HAL_INFO(("modify rule=0x%08x, set jump to 0x%08x", |
320 |
- |
|
|