From 51f53a08e097b6cd61874dbdc2d4323d312fc55e Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Tue, 10 Feb 2009 02:43:07 +0000 Subject: [PATCH] Fix g_part_dumpconf and g_part_name prototpyes. Submitted by: marcel@ --- sys/geom/part/g_part_apm.c | 9 ++++----- sys/geom/part/g_part_gpt.c | 9 ++++----- sys/geom/part/g_part_pc98.c | 10 ++++------ sys/geom/part/g_part_vtoc8.c | 9 ++++----- 4 files changed, 16 insertions(+), 21 deletions(-) diff --git a/sys/geom/part/g_part_apm.c b/sys/geom/part/g_part_apm.c index 4159914f94f..e205da1be0f 100644 --- a/sys/geom/part/g_part_apm.c +++ b/sys/geom/part/g_part_apm.c @@ -62,12 +62,12 @@ static int g_part_apm_add(struct g_part_table *, struct g_part_entry *, struct g_part_parms *); static int g_part_apm_create(struct g_part_table *, struct g_part_parms *); static int g_part_apm_destroy(struct g_part_table *, struct g_part_parms *); -static int g_part_apm_dumpconf(struct g_part_table *, struct g_part_entry *, +static void g_part_apm_dumpconf(struct g_part_table *, struct g_part_entry *, struct sbuf *, const char *); static int g_part_apm_dumpto(struct g_part_table *, struct g_part_entry *); static int g_part_apm_modify(struct g_part_table *, struct g_part_entry *, struct g_part_parms *); -static char *g_part_apm_name(struct g_part_table *, struct g_part_entry *, +static const char *g_part_apm_name(struct g_part_table *, struct g_part_entry *, char *, size_t); static int g_part_apm_probe(struct g_part_table *, struct g_consumer *); static int g_part_apm_read(struct g_part_table *, struct g_consumer *); @@ -248,7 +248,7 @@ g_part_apm_destroy(struct g_part_table *basetable, struct g_part_parms *gpp) return (0); } -static int +static void g_part_apm_dumpconf(struct g_part_table *table, struct g_part_entry *baseentry, struct sbuf *sb, const char *indent) { @@ -273,7 +273,6 @@ g_part_apm_dumpconf(struct g_part_table *table, struct g_part_entry *baseentry, } else { /* confxml: scheme information */ } - return (0); } static int @@ -311,7 +310,7 @@ g_part_apm_modify(struct g_part_table *basetable, return (0); } -static char * +static const char * g_part_apm_name(struct g_part_table *table, struct g_part_entry *baseentry, char *buf, size_t bufsz) { diff --git a/sys/geom/part/g_part_gpt.c b/sys/geom/part/g_part_gpt.c index 13a45617434..db6ebdc1775 100644 --- a/sys/geom/part/g_part_gpt.c +++ b/sys/geom/part/g_part_gpt.c @@ -91,12 +91,12 @@ static int g_part_gpt_add(struct g_part_table *, struct g_part_entry *, static int g_part_gpt_bootcode(struct g_part_table *, struct g_part_parms *); static int g_part_gpt_create(struct g_part_table *, struct g_part_parms *); static int g_part_gpt_destroy(struct g_part_table *, struct g_part_parms *); -static int g_part_gpt_dumpconf(struct g_part_table *, struct g_part_entry *, +static void g_part_gpt_dumpconf(struct g_part_table *, struct g_part_entry *, struct sbuf *, const char *); static int g_part_gpt_dumpto(struct g_part_table *, struct g_part_entry *); static int g_part_gpt_modify(struct g_part_table *, struct g_part_entry *, struct g_part_parms *); -static char *g_part_gpt_name(struct g_part_table *, struct g_part_entry *, +static const char *g_part_gpt_name(struct g_part_table *, struct g_part_entry *, char *, size_t); static int g_part_gpt_probe(struct g_part_table *, struct g_consumer *); static int g_part_gpt_read(struct g_part_table *, struct g_consumer *); @@ -447,7 +447,7 @@ g_part_gpt_destroy(struct g_part_table *basetable, struct g_part_parms *gpp) return (0); } -static int +static void g_part_gpt_dumpconf(struct g_part_table *table, struct g_part_entry *baseentry, struct sbuf *sb, const char *indent) { @@ -470,7 +470,6 @@ g_part_gpt_dumpconf(struct g_part_table *table, struct g_part_entry *baseentry, } else { /* confxml: scheme information */ } - return (0); } static int @@ -502,7 +501,7 @@ g_part_gpt_modify(struct g_part_table *basetable, return (0); } -static char * +static const char * g_part_gpt_name(struct g_part_table *table, struct g_part_entry *baseentry, char *buf, size_t bufsz) { diff --git a/sys/geom/part/g_part_pc98.c b/sys/geom/part/g_part_pc98.c index c7d9d970ea0..d1524055ffb 100644 --- a/sys/geom/part/g_part_pc98.c +++ b/sys/geom/part/g_part_pc98.c @@ -71,12 +71,12 @@ static int g_part_pc98_add(struct g_part_table *, struct g_part_entry *, static int g_part_pc98_bootcode(struct g_part_table *, struct g_part_parms *); static int g_part_pc98_create(struct g_part_table *, struct g_part_parms *); static int g_part_pc98_destroy(struct g_part_table *, struct g_part_parms *); -static int g_part_pc98_dumpconf(struct g_part_table *, struct g_part_entry *, +static void g_part_pc98_dumpconf(struct g_part_table *, struct g_part_entry *, struct sbuf *, const char *); static int g_part_pc98_dumpto(struct g_part_table *, struct g_part_entry *); static int g_part_pc98_modify(struct g_part_table *, struct g_part_entry *, struct g_part_parms *); -static char *g_part_pc98_name(struct g_part_table *, struct g_part_entry *, +static const char *g_part_pc98_name(struct g_part_table *, struct g_part_entry *, char *, size_t); static int g_part_pc98_probe(struct g_part_table *, struct g_consumer *); static int g_part_pc98_read(struct g_part_table *, struct g_consumer *); @@ -257,7 +257,7 @@ g_part_pc98_destroy(struct g_part_table *basetable, struct g_part_parms *gpp) return (0); } -static int +static void g_part_pc98_dumpconf(struct g_part_table *table, struct g_part_entry *baseentry, struct sbuf *sb, const char *indent) { @@ -268,7 +268,6 @@ g_part_pc98_dumpconf(struct g_part_table *table, entry = (struct g_part_pc98_entry *)baseentry; if (entry == NULL) { /* confxml: scheme information */ - return (0); } type = entry->ent.dp_mid + (entry->ent.dp_sid << 8); @@ -288,7 +287,6 @@ g_part_pc98_dumpconf(struct g_part_table *table, sbuf_printf(sb, "%s%u\n", indent, type & 0x7f7f); } - return (0); } static int @@ -318,7 +316,7 @@ g_part_pc98_modify(struct g_part_table *basetable, return (0); } -static char * +static const char * g_part_pc98_name(struct g_part_table *table, struct g_part_entry *baseentry, char *buf, size_t bufsz) { diff --git a/sys/geom/part/g_part_vtoc8.c b/sys/geom/part/g_part_vtoc8.c index 78212c36983..0f9c283c267 100644 --- a/sys/geom/part/g_part_vtoc8.c +++ b/sys/geom/part/g_part_vtoc8.c @@ -55,12 +55,12 @@ static int g_part_vtoc8_add(struct g_part_table *, struct g_part_entry *, struct g_part_parms *); static int g_part_vtoc8_create(struct g_part_table *, struct g_part_parms *); static int g_part_vtoc8_destroy(struct g_part_table *, struct g_part_parms *); -static int g_part_vtoc8_dumpconf(struct g_part_table *, struct g_part_entry *, +static void g_part_vtoc8_dumpconf(struct g_part_table *, struct g_part_entry *, struct sbuf *, const char *); static int g_part_vtoc8_dumpto(struct g_part_table *, struct g_part_entry *); static int g_part_vtoc8_modify(struct g_part_table *, struct g_part_entry *, struct g_part_parms *); -static char *g_part_vtoc8_name(struct g_part_table *, struct g_part_entry *, +static const char *g_part_vtoc8_name(struct g_part_table *, struct g_part_entry *, char *, size_t); static int g_part_vtoc8_probe(struct g_part_table *, struct g_consumer *); static int g_part_vtoc8_read(struct g_part_table *, struct g_consumer *); @@ -238,7 +238,7 @@ g_part_vtoc8_destroy(struct g_part_table *basetable, struct g_part_parms *gpp) return (0); } -static int +static void g_part_vtoc8_dumpconf(struct g_part_table *basetable, struct g_part_entry *entry, struct sbuf *sb, const char *indent) { @@ -257,7 +257,6 @@ g_part_vtoc8_dumpconf(struct g_part_table *basetable, } else { /* confxml: scheme information */ } - return (0); } static int @@ -297,7 +296,7 @@ g_part_vtoc8_modify(struct g_part_table *basetable, return (0); } -static char * +static const char * g_part_vtoc8_name(struct g_part_table *table, struct g_part_entry *baseentry, char *buf, size_t bufsz) {