search for: strtolower

Displaying 20 results from an estimated 32 matches for "strtolower".

2016 Jun 30
6
[PATCH 0/6] lib: string: add function strtolower()
This series introduces a new generic function strtolower(), which converts strings to lowercase in-place, overwriting the original string. This kind of functionality is needed in several places in the kernel. Right now, everybody seems to be implementing their own copy of this function. So, we replace several custom "strtolower" implementations...
2016 Jul 05
3
[PATCH v2 0/7] lib: string: add functions to case-convert strings
...(char *dst, const char *src, size_t len); >> char *strncpytolower(char *dst, const char *src, size_t len); >> char *strcpytoupper(char *dst, const char *src); >> char *strcpytolower(char *dst, const char *src); >> char *strtoupper(char *s); >> char *strtolower(char *s); > > I think there isn't much value in anything other > than strto<upper|lower>. > > Using str[n]cpy followed by strto<upper|lower> is > pretty obvious and rarely used anyway. First time around, folks were proposing the "copy" variants when I su...
2016 Jul 01
2
[PATCH 1/6] lib: string: add function strtolower()
On Fri, 01 Jul 2016, Markus Mayer <mmayer at broadcom.com> wrote: > Add a function called strtolower() to convert strings to lower case > in-place, overwriting the original string. > > This seems to be a recurring requirement in the kernel that is > currently being solved by several duplicated implementations doing the > same thing. > > Signed-off-by: Markus Mayer <mmayer a...
2016 Jul 01
1
[PATCH 1/6] lib: string: add function strtolower()
On Fri, Jul 01 2016, Markus Mayer <mmayer at broadcom.com> wrote: > Add a function called strtolower() to convert strings to lower case > in-place, overwriting the original string. > > This seems to be a recurring requirement in the kernel that is > currently being solved by several duplicated implementations doing the > same thing. > > Signed-off-by: Markus Mayer <mmayer a...
2016 Jul 02
2
[PATCH 2/6] drm/nouveau/core: make use of new strtolower() function
On Fri, Jul 1, 2016 at 8:50 AM, Markus Mayer <mmayer at broadcom.com> wrote: > Call strtolower() rather than walking the string explicitly to convert > it to lowercase. > > Signed-off-by: Markus Mayer <mmayer at broadcom.com> > --- > drivers/gpu/drm/nouveau/nvkm/core/firmware.c | 7 +------ > 1 file changed, 1 insertion(+), 6 deletions(-) > > diff --git a/drive...
2016 Jun 30
0
[PATCH 1/6] lib: string: add function strtolower()
Add a function called strtolower() to convert strings to lower case in-place, overwriting the original string. This seems to be a recurring requirement in the kernel that is currently being solved by several duplicated implementations doing the same thing. Signed-off-by: Markus Mayer <mmayer at broadcom.com> --- include/l...
2016 Jul 01
0
[PATCH 1/6] lib: string: add function strtolower()
On 1 July 2016 at 03:52, Jani Nikula <jani.nikula at linux.intel.com> wrote: > On Fri, 01 Jul 2016, Markus Mayer <mmayer at broadcom.com> wrote: >> Add a function called strtolower() to convert strings to lower case >> in-place, overwriting the original string. >> >> This seems to be a recurring requirement in the kernel that is >> currently being solved by several duplicated implementations doing the >> same thing. >> >> Signed-off-b...
2016 Jul 01
0
[PATCH 1/6] lib: string: add function strtolower()
On Fri, 01 Jul 2016, Markus Mayer <markus.mayer at broadcom.com> wrote: > On 1 July 2016 at 03:52, Jani Nikula <jani.nikula at linux.intel.com> wrote: >> On Fri, 01 Jul 2016, Markus Mayer <mmayer at broadcom.com> wrote: >>> Add a function called strtolower() to convert strings to lower case >>> in-place, overwriting the original string. >>> >>> This seems to be a recurring requirement in the kernel that is >>> currently being solved by several duplicated implementations doing the >>> same thing. >>&g...
2016 Jul 02
1
[PATCH 2/6] drm/nouveau/core: make use of new strtolower() function
On 1 July 2016 at 18:18, Alexandre Courbot <gnurou at gmail.com> wrote: > On Fri, Jul 1, 2016 at 8:50 AM, Markus Mayer <mmayer at broadcom.com> wrote: >> Call strtolower() rather than walking the string explicitly to convert >> it to lowercase. >> >> Signed-off-by: Markus Mayer <mmayer at broadcom.com> >> --- >> drivers/gpu/drm/nouveau/nvkm/core/firmware.c | 7 +------ >> 1 file changed, 1 insertion(+), 6 deletions(-) >...
2016 Jun 30
0
[PATCH 2/6] drm/nouveau/core: make use of new strtolower() function
Call strtolower() rather than walking the string explicitly to convert it to lowercase. Signed-off-by: Markus Mayer <mmayer at broadcom.com> --- drivers/gpu/drm/nouveau/nvkm/core/firmware.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/core/firmware....
2016 Jul 04
0
[PATCH 2/6] drm/nouveau/core: make use of new strtolower() function
On Sun, Jul 3, 2016 at 12:21 AM, Markus Mayer <markus.mayer at broadcom.com> wrote: > On 1 July 2016 at 18:18, Alexandre Courbot <gnurou at gmail.com> wrote: >> On Fri, Jul 1, 2016 at 8:50 AM, Markus Mayer <mmayer at broadcom.com> wrote: >>> Call strtolower() rather than walking the string explicitly to convert >>> it to lowercase. >>> >>> Signed-off-by: Markus Mayer <mmayer at broadcom.com> >>> --- >>> drivers/gpu/drm/nouveau/nvkm/core/firmware.c | 7 +------ >>> 1 file changed, 1 insertion...
2016 Jul 05
0
[PATCH v2 0/7] lib: string: add functions to case-convert strings
...ize_t len); > > >     char *strncpytolower(char *dst, const char *src, size_t len); > > >     char *strcpytoupper(char *dst, const char *src); > > >     char *strcpytolower(char *dst, const char *src); > > >     char *strtoupper(char *s); > > >     char *strtolower(char *s); > > I think there isn't much value in anything other > > than strto. > > > > Using str[n]cpy followed by strto is > > pretty obvious and rarely used anyway. > First time around, folks were proposing the "copy" variants when I > submitted...
2016 Jul 05
7
[PATCH v2 0/7] lib: string: add functions to case-convert strings
...these new functions: char *strncpytoupper(char *dst, const char *src, size_t len); char *strncpytolower(char *dst, const char *src, size_t len); char *strcpytoupper(char *dst, const char *src); char *strcpytolower(char *dst, const char *src); char *strtoupper(char *s); char *strtolower(char *s); They all return a pointer to the terminating '\0' in the destination string (for strtoupper() and strtolower() that is "s"). Several drivers are being modified to make use of the functions above. Another driver that also makes use of this functionality will be submitted...
2016 Jul 13
1
[PATCH v3 0/7] lib: string: add functions to case-convert strings
...rc, size_t len); > >> void strlcpytolower(char *dst, const char *src, size_t len); > >> void strcpytoupper(char *dst, const char *src); > >> void strcpytolower(char *dst, const char *src); > >> void strtoupper(char *s); > >> void strtolower(char *s); > > > > > > You may want to read the article here: > > > > https://lwn.net/Articles/659214/ > > I'll read that. Thanks. It doesn't look like there is going to be the danger of "mass changes". So far, I have two ACKs (one where the s...
2016 Jul 08
6
[PATCH v3 0/7] lib: string: add functions to case-convert strings
...osing these new functions: void strlcpytoupper(char *dst, const char *src, size_t len); void strlcpytolower(char *dst, const char *src, size_t len); void strcpytoupper(char *dst, const char *src); void strcpytolower(char *dst, const char *src); void strtoupper(char *s); void strtolower(char *s); Several drivers are being modified to make use of the functions above. Another driver that also makes use of this functionality will be submitted upstream shortly, which prompted this whole exercise. The changes made here have been compile-tested, but not tried out, due to lack of requi...
2016 Jul 09
2
[PATCH v3 1/7] lib: string: add functions to case-convert strings
...; void strlcpytoupper(char *dst, const char *src, size_t len); > void strlcpytolower(char *dst, const char *src, size_t len); > void strcpytoupper(char *dst, const char *src); > void strcpytolower(char *dst, const char *src); > void strtoupper(char *s); > void strtolower(char *s); > > The "str[l]cpyto*" versions of the function take a destination string > and a source string as arguments. The "strlcpyto*" versions additionally > take a length argument like strlcpy() itself. Lastly, the strto* > functions take a single string argu...
2016 Jul 10
1
[PATCH v3 0/7] lib: string: add functions to case-convert strings
...void strlcpytoupper(char *dst, const char *src, size_t len); > void strlcpytolower(char *dst, const char *src, size_t len); > void strcpytoupper(char *dst, const char *src); > void strcpytolower(char *dst, const char *src); > void strtoupper(char *s); > void strtolower(char *s); You may want to read the article here: https://lwn.net/Articles/659214/ and follow up some of the discussion threads on LKML about the best semantics to advertise for the strlcpy/strscpy variants. It might be helpful to return some kind of overflow/truncation error from your copy func...
2016 Aug 10
3
[PATCH v5 0/7] lib: string: add functions to case-convert strings
...oposing these new functions: int strlcpytoupper(char *dst, const char *src, size_t len); int strlcpytolower(char *dst, const char *src, size_t len); void strcpytoupper(char *dst, const char *src); void strcpytolower(char *dst, const char *src); void strtoupper(char *s); void strtolower(char *s); Several drivers are being modified to make use of the functions above. Another driver that also makes use of this functionality will be submitted upstream shortly, which prompted this whole exercise. The changes made here have been compile-tested, but not tried out, due to lack of requi...
2016 Jul 22
3
[PATCH v4 0/7] lib: string: add functions to case-convert strings
...oposing these new functions: int strlcpytoupper(char *dst, const char *src, size_t len); int strlcpytolower(char *dst, const char *src, size_t len); void strcpytoupper(char *dst, const char *src); void strcpytolower(char *dst, const char *src); void strtoupper(char *s); void strtolower(char *s); Several drivers are being modified to make use of the functions above. Another driver that also makes use of this functionality will be submitted upstream shortly, which prompted this whole exercise. The changes made here have been compile-tested, but not tried out, due to lack of requi...
2016 Jul 08
0
[PATCH v3 1/7] lib: string: add functions to case-convert strings
...on. The new functions are void strlcpytoupper(char *dst, const char *src, size_t len); void strlcpytolower(char *dst, const char *src, size_t len); void strcpytoupper(char *dst, const char *src); void strcpytolower(char *dst, const char *src); void strtoupper(char *s); void strtolower(char *s); The "str[l]cpyto*" versions of the function take a destination string and a source string as arguments. The "strlcpyto*" versions additionally take a length argument like strlcpy() itself. Lastly, the strto* functions take a single string argument and modify the passe...