"Fossies" - the Fresh Open Source Software Archive
Member "dmidecode-3.3/util.h" (14 Oct 2020, 1241 Bytes) of package /linux/privat/dmidecode-3.3.tar.xz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard
) with prefixed line numbers and code folding
Alternatively you can here view
the uninterpreted source code file.
For more information about "util.h" see the Fossies "Dox" file reference
documentation and the last Fossies "Diffs"
side-by-side code changes report: 3.0_vs_3.1
2 * This file is part of the dmidecode project.
4 * Copyright (C) 2003-2017 Jean Delvare <email@example.com>
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
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #include <sys/types.h>
23 #include "types.h"
25 #define ARRAY_SIZE(x) (sizeof(x)/sizeof((x)))
27 int checksum(const u8 *buf, size_t len);
28 void *read_file(off_t base, size_t *len, const char *filename);
29 void *mem_chunk(off_t base, size_t len, const char *devmem);
30 int write_dump(size_t base, size_t len, const void *data, const char *dumpfile, int add);
31 u64 u64_range(u64 start, u64 end);