summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean Delvare <jdelvare@suse.de>2008-10-28 09:41:07 +0000
committerJean Delvare <jdelvare@suse.de>2008-10-28 09:41:07 +0000
commitc1666d8deb9f3e20b7b066df2417ce924586a2b8 (patch)
treecb68dccb113fadee3b41b9cd59e3a0c4a4a838b3
parent68b3681f6027ef1e36c321924cfd05b9b57101e4 (diff)
downloaddmidecode-git-c1666d8deb9f3e20b7b066df2417ce924586a2b8.tar.gz
Mark a few pointers const.
-rw-r--r--dmidecode.c16
-rw-r--r--dmidecode.h4
-rw-r--r--dmioem.c6
-rw-r--r--dmioem.h4
4 files changed, 15 insertions, 15 deletions
diff --git a/dmidecode.c b/dmidecode.c
index cc8389f..b85ef06 100644
--- a/dmidecode.c
+++ b/dmidecode.c
@@ -67,7 +67,7 @@ static const char *bad_index = "<BAD INDEX>";
* Type-independant Stuff
*/
-const char *dmi_string(struct dmi_header *dm, u8 s)
+const char *dmi_string(const struct dmi_header *dm, u8 s)
{
char *bp = (char *)dm->data;
size_t i, len;
@@ -154,7 +154,7 @@ static int dmi_bcd_range(u8 value, u8 low, u8 high)
return 1;
}
-static void dmi_dump(struct dmi_header *h, const char *prefix)
+static void dmi_dump(const struct dmi_header *h, const char *prefix)
{
int row, i;
const char *s;
@@ -1599,7 +1599,7 @@ static const char *dmi_on_board_devices_type(u8 code)
return out_of_spec;
}
-static void dmi_on_board_devices(struct dmi_header *h, const char *prefix)
+static void dmi_on_board_devices(const struct dmi_header *h, const char *prefix)
{
u8 *p = h->data + 4;
u8 count = (h->length - 0x04) / 2;
@@ -1626,7 +1626,7 @@ static void dmi_on_board_devices(struct dmi_header *h, const char *prefix)
* 3.3.12 OEM Strings (Type 11)
*/
-static void dmi_oem_strings(struct dmi_header *h, const char *prefix)
+static void dmi_oem_strings(const struct dmi_header *h, const char *prefix)
{
u8 *p = h->data + 4;
u8 count = p[0x00];
@@ -1641,7 +1641,7 @@ static void dmi_oem_strings(struct dmi_header *h, const char *prefix)
* 3.3.13 System Configuration Options (Type 12)
*/
-static void dmi_system_configuration_options(struct dmi_header *h, const char *prefix)
+static void dmi_system_configuration_options(const struct dmi_header *h, const char *prefix)
{
u8 *p = h->data + 4;
u8 count = p[0x00];
@@ -1656,7 +1656,7 @@ static void dmi_system_configuration_options(struct dmi_header *h, const char *p
* 3.3.14 BIOS Language Information (Type 13)
*/
-static void dmi_bios_languages(struct dmi_header *h, const char *prefix)
+static void dmi_bios_languages(const struct dmi_header *h, const char *prefix)
{
u8 *p = h->data + 4;
u8 count=p[0x00];
@@ -2770,7 +2770,7 @@ static const char *dmi_power_supply_range_switching(u8 code)
* Main
*/
-static void dmi_decode(struct dmi_header *h, u16 ver)
+static void dmi_decode(const struct dmi_header *h, u16 ver)
{
const u8 *data = h->data;
@@ -3761,7 +3761,7 @@ static void to_dmi_header(struct dmi_header *h, u8 *data)
h->data = data;
}
-static void dmi_table_string(struct dmi_header *h, const u8 *data, u16 ver)
+static void dmi_table_string(const struct dmi_header *h, const u8 *data, u16 ver)
{
int key;
u8 offset = opt.string->offset;
diff --git a/dmidecode.h b/dmidecode.h
index ae284f7..cae627b 100644
--- a/dmidecode.h
+++ b/dmidecode.h
@@ -1,7 +1,7 @@
/*
* This file is part of the dmidecode project.
*
- * Copyright (C) 2005-2007 Jean Delvare <khali@linux-fr.org>
+ * Copyright (C) 2005-2008 Jean Delvare <khali@linux-fr.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -26,4 +26,4 @@ struct dmi_header
u8 *data;
};
-const char *dmi_string(struct dmi_header *dm, u8 s);
+const char *dmi_string(const struct dmi_header *dm, u8 s);
diff --git a/dmioem.c b/dmioem.c
index cf684df..3c996a9 100644
--- a/dmioem.c
+++ b/dmioem.c
@@ -2,7 +2,7 @@
* Decoding of OEM-specific entries
* This file is part of the dmidecode project.
*
- * Copyright (C) 2007 Jean Delvare <khali@linux-fr.org>
+ * Copyright (C) 2007-2008 Jean Delvare <khali@linux-fr.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -51,7 +51,7 @@ void dmi_set_vendor(const char *s)
* Code contributed by John Cagle.
*/
-static int dmi_decode_hp(struct dmi_header *h)
+static int dmi_decode_hp(const struct dmi_header *h)
{
u8 *data = h->data;
int nic, ptr;
@@ -117,7 +117,7 @@ static int dmi_decode_hp(struct dmi_header *h)
* Dispatch vendor-specific entries decoding
* Return 1 if decoding was successful, 0 otherwise
*/
-int dmi_decode_oem(struct dmi_header *h)
+int dmi_decode_oem(const struct dmi_header *h)
{
switch (dmi_vendor)
{
diff --git a/dmioem.h b/dmioem.h
index d4c2ce4..1c4971f 100644
--- a/dmioem.h
+++ b/dmioem.h
@@ -2,7 +2,7 @@
* Decoding of OEM-specific entries
* This file is part of the dmidecode project.
*
- * Copyright (C) 2007 Jean Delvare <khali@linux-fr.org>
+ * Copyright (C) 2007-2008 Jean Delvare <khali@linux-fr.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -22,4 +22,4 @@
struct dmi_header;
void dmi_set_vendor(const char *s);
-int dmi_decode_oem(struct dmi_header *h);
+int dmi_decode_oem(const struct dmi_header *h);