]>
Commit | Line | Data |
---|---|---|
f8d9ccde AY |
1 | /* |
2 | * Implementation of get_cpuid(). | |
3 | * | |
4 | * Copyright 2014 IBM Corp. | |
5 | * Author(s): Alexander Yarygin <yarygin@linux.vnet.ibm.com> | |
6 | * | |
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. | |
10 | */ | |
11 | ||
12 | #include <sys/types.h> | |
13 | #include <unistd.h> | |
14 | #include <stdio.h> | |
15 | #include <string.h> | |
16 | ||
17 | #include "../../util/header.h" | |
18 | ||
19 | int get_cpuid(char *buffer, size_t sz) | |
20 | { | |
21 | const char *cpuid = "IBM/S390"; | |
22 | ||
23 | if (strlen(cpuid) + 1 > sz) | |
24 | return -1; | |
25 | ||
26 | strcpy(buffer, cpuid); | |
27 | return 0; | |
28 | } |