Message ID | 20231127102523.28003-11-jgross@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Mini-OS: hide mini-os internal symbols | expand |
Juergen Gross, le lun. 27 nov. 2023 11:25:01 +0100, a ecrit: > Add the needed instances of EXPORT_SYMBOL() to lib/printf.c. > > Signed-off-by: Juergen Gross <jgross@suse.com> Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org> > --- > V3: > - new patch > --- > lib/printf.c | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/lib/printf.c b/lib/printf.c > index f9e9d682..0e054957 100644 > --- a/lib/printf.c > +++ b/lib/printf.c > @@ -150,6 +150,7 @@ strtoul(const char *nptr, char **endptr, int base) > *endptr = __DECONST(char *, any ? s - 1 : nptr); > return (acc); > } > +EXPORT_SYMBOL(strtoul); > > /* > * Convert a string to a quad integer. > @@ -241,6 +242,7 @@ strtoq(const char *nptr, char **endptr, int base) > *endptr = __DECONST(char *, any ? s - 1 : nptr); > return (acc); > } > +EXPORT_SYMBOL(strtoq); > > /* > * Convert a string to an unsigned quad integer. > @@ -309,6 +311,7 @@ strtouq(const char *nptr, char **endptr, int base) > *endptr = __DECONST(char *, any ? s - 1 : nptr); > return (acc); > } > +EXPORT_SYMBOL(strtouq); > > /* > * Scaled down version of printf(3). > @@ -585,6 +588,7 @@ number: > } > #undef PCHAR > } > +EXPORT_SYMBOL(vsnprintf); > > /** > * snprintf - Format a string and place it in a buffer > @@ -603,6 +607,7 @@ int snprintf(char * buf, size_t size, const char *fmt, ...) > va_end(args); > return i; > } > +EXPORT_SYMBOL(snprintf); > > /** > * vsprintf - Format a string and place it in a buffer > @@ -617,7 +622,7 @@ int vsprintf(char *buf, const char *fmt, va_list args) > { > return vsnprintf(buf, 0xFFFFFFFFUL, fmt, args); > } > - > +EXPORT_SYMBOL(vsprintf); > > /** > * sprintf - Format a string and place it in a buffer > @@ -635,6 +640,7 @@ int sprintf(char * buf, const char *fmt, ...) > va_end(args); > return i; > } > +EXPORT_SYMBOL(sprintf); > > /* > * Fill in the given table from the scanset at the given format > @@ -1214,6 +1220,7 @@ input_failure: > match_failure: > return (nassigned); > } > +EXPORT_SYMBOL(vsscanf); > > /** > * sscanf - Unformat a buffer into a list of arguments > @@ -1231,5 +1238,6 @@ int sscanf(const char * buf, const char * fmt, ...) > va_end(args); > return i; > } > +EXPORT_SYMBOL(sscanf); > > #endif > -- > 2.35.3 >
diff --git a/lib/printf.c b/lib/printf.c index f9e9d682..0e054957 100644 --- a/lib/printf.c +++ b/lib/printf.c @@ -150,6 +150,7 @@ strtoul(const char *nptr, char **endptr, int base) *endptr = __DECONST(char *, any ? s - 1 : nptr); return (acc); } +EXPORT_SYMBOL(strtoul); /* * Convert a string to a quad integer. @@ -241,6 +242,7 @@ strtoq(const char *nptr, char **endptr, int base) *endptr = __DECONST(char *, any ? s - 1 : nptr); return (acc); } +EXPORT_SYMBOL(strtoq); /* * Convert a string to an unsigned quad integer. @@ -309,6 +311,7 @@ strtouq(const char *nptr, char **endptr, int base) *endptr = __DECONST(char *, any ? s - 1 : nptr); return (acc); } +EXPORT_SYMBOL(strtouq); /* * Scaled down version of printf(3). @@ -585,6 +588,7 @@ number: } #undef PCHAR } +EXPORT_SYMBOL(vsnprintf); /** * snprintf - Format a string and place it in a buffer @@ -603,6 +607,7 @@ int snprintf(char * buf, size_t size, const char *fmt, ...) va_end(args); return i; } +EXPORT_SYMBOL(snprintf); /** * vsprintf - Format a string and place it in a buffer @@ -617,7 +622,7 @@ int vsprintf(char *buf, const char *fmt, va_list args) { return vsnprintf(buf, 0xFFFFFFFFUL, fmt, args); } - +EXPORT_SYMBOL(vsprintf); /** * sprintf - Format a string and place it in a buffer @@ -635,6 +640,7 @@ int sprintf(char * buf, const char *fmt, ...) va_end(args); return i; } +EXPORT_SYMBOL(sprintf); /* * Fill in the given table from the scanset at the given format @@ -1214,6 +1220,7 @@ input_failure: match_failure: return (nassigned); } +EXPORT_SYMBOL(vsscanf); /** * sscanf - Unformat a buffer into a list of arguments @@ -1231,5 +1238,6 @@ int sscanf(const char * buf, const char * fmt, ...) va_end(args); return i; } +EXPORT_SYMBOL(sscanf); #endif
Add the needed instances of EXPORT_SYMBOL() to lib/printf.c. Signed-off-by: Juergen Gross <jgross@suse.com> --- V3: - new patch --- lib/printf.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)