search for: dmu_ctl_queue_msg

Displaying 1 result from an estimated 1 matches for "dmu_ctl_queue_msg".

2006 Aug 21
1
[PATCH 3 of 6] dm-userspace internal libdmu support for userspace tool
...ake_version(int maj, int min, int patch) +{ + return 0 | (maj << 16) | (min << 8) | patch; +} + +static void dmu_split_dev(dev_t dev, uint32_t *maj, uint32_t *min) +{ + *maj = (dev & 0xFF00) >> 8; + *min = (dev & 0x00FF); +} + +/* Queue a message for sending */ +static int dmu_ctl_queue_msg(struct dmu_context *ctx, int type, void *msg) +{ + struct dmu_msg_header hdr; + + hdr.msg_type = type; + hdr.payload_len = dmu_get_msg_len(type); + hdr.id = ctx->id_ctr++; + + if ((ctx->out_ptr + (sizeof(hdr) + hdr.payload_len)) > ctx->buf_size) + return 0; /* No room for this */ + + m...