Deleted Added
full compact
xenbusb.c (196403) xenbusb.c (201758)
1/******************************************************************************
2 * Talks to Xen Store to figure out what devices we have.
3 *
4 * Copyright (C) 2008 Doug Rabson
5 * Copyright (C) 2005 Rusty Russell, IBM Corporation
6 * Copyright (C) 2005 Mike Wray, Hewlett-Packard
7 * Copyright (C) 2005 XenSource Ltd
8 *

--- 22 unchanged lines hidden (view full) ---

31#if 0
32#define DPRINTK(fmt, args...) \
33 printf("xenbus_probe (%s:%d) " fmt ".\n", __FUNCTION__, __LINE__, ##args)
34#else
35#define DPRINTK(fmt, args...) ((void)0)
36#endif
37
38#include <sys/cdefs.h>
1/******************************************************************************
2 * Talks to Xen Store to figure out what devices we have.
3 *
4 * Copyright (C) 2008 Doug Rabson
5 * Copyright (C) 2005 Rusty Russell, IBM Corporation
6 * Copyright (C) 2005 Mike Wray, Hewlett-Packard
7 * Copyright (C) 2005 XenSource Ltd
8 *

--- 22 unchanged lines hidden (view full) ---

31#if 0
32#define DPRINTK(fmt, args...) \
33 printf("xenbus_probe (%s:%d) " fmt ".\n", __FUNCTION__, __LINE__, ##args)
34#else
35#define DPRINTK(fmt, args...) ((void)0)
36#endif
37
38#include <sys/cdefs.h>
39__FBSDID("$FreeBSD: head/sys/xen/xenbus/xenbus_probe.c 196403 2009-08-20 19:17:53Z jhb $");
39__FBSDID("$FreeBSD: head/sys/xen/xenbus/xenbus_probe.c 201758 2010-01-07 21:01:37Z mbr $");
40
41#include <sys/param.h>
42#include <sys/bus.h>
43#include <sys/kernel.h>
44#include <sys/lock.h>
45#include <sys/malloc.h>
46#include <sys/module.h>
47#include <sys/sysctl.h>

--- 277 unchanged lines hidden (view full) ---

325static void
326xenbus_devices_changed(struct xenbus_watch *watch,
327 const char **vec, unsigned int len)
328{
329 struct xenbus_softc *sc = (struct xenbus_softc *) watch;
330 device_t dev = sc->xs_dev;
331 char *node, *bus, *type, *id, *p;
332
40
41#include <sys/param.h>
42#include <sys/bus.h>
43#include <sys/kernel.h>
44#include <sys/lock.h>
45#include <sys/malloc.h>
46#include <sys/module.h>
47#include <sys/sysctl.h>

--- 277 unchanged lines hidden (view full) ---

325static void
326xenbus_devices_changed(struct xenbus_watch *watch,
327 const char **vec, unsigned int len)
328{
329 struct xenbus_softc *sc = (struct xenbus_softc *) watch;
330 device_t dev = sc->xs_dev;
331 char *node, *bus, *type, *id, *p;
332
333 node = strdup(vec[XS_WATCH_PATH], M_DEVBUF);;
333 node = strdup(vec[XS_WATCH_PATH], M_DEVBUF);
334 p = strchr(node, '/');
335 if (!p)
336 goto out;
337 bus = node;
338 *p = 0;
339 type = p + 1;
340
341 p = strchr(type, '/');

--- 261 unchanged lines hidden ---
334 p = strchr(node, '/');
335 if (!p)
336 goto out;
337 bus = node;
338 *p = 0;
339 type = p + 1;
340
341 p = strchr(type, '/');

--- 261 unchanged lines hidden ---