3 * Copyright (C) 2011 - 2013 UNISYS CORPORATION
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or (at
9 * your option) any later version.
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
14 * NON INFRINGEMENT. See the GNU General Public License for more
18 #ifndef __VBUSHELPER_H__
19 #define __VBUSHELPER_H__
21 /* TARGET_HOSTNAME specified as -DTARGET_HOSTNAME=\"thename\" on the
24 #define TARGET_HOSTNAME "linuxguest"
26 static inline void bus_device_info_init(
27 struct ultra_vbus_deviceinfo *bus_device_info_ptr,
28 const char *dev_type, const char *drv_name,
29 const char *ver, const char *ver_tag)
31 memset(bus_device_info_ptr, 0, sizeof(struct ultra_vbus_deviceinfo));
32 snprintf(bus_device_info_ptr->devtype,
33 sizeof(bus_device_info_ptr->devtype),
34 "%s", (dev_type) ? dev_type : "unknownType");
35 snprintf(bus_device_info_ptr->drvname,
36 sizeof(bus_device_info_ptr->drvname),
37 "%s", (drv_name) ? drv_name : "unknownDriver");
38 snprintf(bus_device_info_ptr->infostrs,
39 sizeof(bus_device_info_ptr->infostrs), "%s\t%s\t%s",
40 (ver) ? ver : "unknownVer",
41 (ver_tag) ? ver_tag : "unknownVerTag",