]>
git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blob - drivers/staging/unisys/include/vbushelper.h
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 #include "vbusdeviceinfo.h"
23 /* TARGET_HOSTNAME specified as -DTARGET_HOSTNAME=\"thename\" on the
26 #define TARGET_HOSTNAME "linuxguest"
28 static inline void bus_device_info_init(
29 struct ultra_vbus_deviceinfo
*bus_device_info_ptr
,
30 const char *dev_type
, const char *drv_name
,
31 const char *ver
, const char *ver_tag
)
33 memset(bus_device_info_ptr
, 0, sizeof(struct ultra_vbus_deviceinfo
));
34 snprintf(bus_device_info_ptr
->devtype
,
35 sizeof(bus_device_info_ptr
->devtype
),
36 "%s", (dev_type
) ? dev_type
: "unknownType");
37 snprintf(bus_device_info_ptr
->drvname
,
38 sizeof(bus_device_info_ptr
->drvname
),
39 "%s", (drv_name
) ? drv_name
: "unknownDriver");
40 snprintf(bus_device_info_ptr
->infostrs
,
41 sizeof(bus_device_info_ptr
->infostrs
), "%s\t%s\t%s",
42 (ver
) ? ver
: "unknownVer",
43 (ver_tag
) ? ver_tag
: "unknownVerTag",