Linux 4.1.18
[linux/fpc-iii.git] / tools / perf / arch / s390 / util / header.c
blob9fa6c3e5782c39093c2cb5767015fdf2d0256de4
1 /*
2 * Implementation of get_cpuid().
4 * Copyright 2014 IBM Corp.
5 * Author(s): Alexander Yarygin <yarygin@linux.vnet.ibm.com>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License (version 2 only)
9 * as published by the Free Software Foundation.
12 #include <sys/types.h>
13 #include <unistd.h>
14 #include <stdio.h>
15 #include <string.h>
17 #include "../../util/header.h"
19 int get_cpuid(char *buffer, size_t sz)
21 const char *cpuid = "IBM/S390";
23 if (strlen(cpuid) + 1 > sz)
24 return -1;
26 strcpy(buffer, cpuid);
27 return 0;