static unsigned int protocol_step(struct service_backend *backend, struct service_state *state, unsigned int id, unsigned int current) { struct cpio_header *header = mapheader(backend, state, id); if (!header) return 0; switch (header->mode & 0xF000) { case 0x4000: return stepdirectory(backend, state, id, (id == current) ? 0 : current); } return 0; }
static unsigned int protocol_step(struct service_backend *backend, struct service_state *state) { struct cpio_header header; if (!readheader(backend, &header, state->id)) return 0; switch (header.mode & 0xF000) { case 0x4000: return stepdirectory(backend, state->id, state->current); } return 0; }