]> Git Repo - linux.git/blob - drivers/staging/unisys/include/vbushelper.h
cgroup: bpf: Add bpf_skb_in_cgroup_proto
[linux.git] / drivers / staging / unisys / include / vbushelper.h
1 /* vbushelper.h
2  *
3  * Copyright (C) 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 /* TARGET_HOSTNAME specified as -DTARGET_HOSTNAME=\"thename\" on the
22  * command line
23  */
24
25 #define TARGET_HOSTNAME "linuxguest"
26
27 static inline void bus_device_info_init(
28                 struct ultra_vbus_deviceinfo *bus_device_info_ptr,
29                 const char *dev_type, const char *drv_name,
30                 const char *ver, const char *ver_tag)
31 {
32         memset(bus_device_info_ptr, 0, sizeof(struct ultra_vbus_deviceinfo));
33         snprintf(bus_device_info_ptr->devtype,
34                  sizeof(bus_device_info_ptr->devtype),
35                  "%s", (dev_type) ? dev_type : "unknownType");
36         snprintf(bus_device_info_ptr->drvname,
37                  sizeof(bus_device_info_ptr->drvname),
38                  "%s", (drv_name) ? drv_name : "unknownDriver");
39         snprintf(bus_device_info_ptr->infostrs,
40                  sizeof(bus_device_info_ptr->infostrs), "%s\t%s\t%s",
41                  (ver) ? ver : "unknownVer",
42                  (ver_tag) ? ver_tag : "unknownVerTag",
43                  TARGET_HOSTNAME);
44 }
45
46 #endif
This page took 0.03373 seconds and 4 git commands to generate.