Пример #1
0
static ssize_t cdata_write(struct file *filp, const char *buf, 
				size_t size, loff_t *off)
{
	printk(KERN_ALERT "cdata_write: %s\n", buf);
        card_write(filp, buf, size);

	return 0;
}
Пример #2
0
static void handle_write(struct sstate *ss, struct client *c,
			 void *buf, int len)
{
	struct tx_info *ti = buf;
	void *hdr = (ti+1);
	int rc;
	uint32_t x;

	len -= sizeof(*ti);

	debug(ss, c, 2, "Relaying %d bytes packet from client\n", len);
	rc = card_write(ss, hdr, len, ti);
	x = htonl(rc);

	net_send_kill(c, NET_RC, &x, sizeof(x));
}