ed943759634acd9678c7e280563e5a772f0320d4
[deliverable/linux.git] / drivers / staging / unisys / include / vbushelper.h
1 /* vbushelper.h
2 *
3 * Copyright © 2011 - 2013 UNISYS CORPORATION
4 * All rights reserved.
5 *
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.
10 *
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
15 * details.
16 */
17
18 #ifndef __VBUSHELPER_H__
19 #define __VBUSHELPER_H__
20
21 #include "vbusdeviceinfo.h"
22
23 /* TARGET_HOSTNAME specified as -DTARGET_HOSTNAME=\"thename\" on the
24 * command line */
25
26 #define TARGET_HOSTNAME "linuxguest"
27
28 static inline void
29 BusDeviceInfo_Init(ULTRA_VBUS_DEVICEINFO *pBusDeviceInfo,
30 const char *deviceType, const char *driverName,
31 const char *ver, const char *verTag)
32 {
33 memset(pBusDeviceInfo, 0, sizeof(ULTRA_VBUS_DEVICEINFO));
34 snprintf(pBusDeviceInfo->devType, sizeof(pBusDeviceInfo->devType),
35 "%s", (deviceType) ? deviceType : "unknownType");
36 snprintf(pBusDeviceInfo->drvName, sizeof(pBusDeviceInfo->drvName),
37 "%s", (driverName) ? driverName : "unknownDriver");
38 snprintf(pBusDeviceInfo->infoStrings,
39 sizeof(pBusDeviceInfo->infoStrings), "%s\t%s\t%s",
40 (ver) ? ver : "unknownVer",
41 (verTag) ? verTag : "unknownVerTag",
42 TARGET_HOSTNAME);
43 }
44
45 #endif
This page took 0.032578 seconds and 4 git commands to generate.