linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fs: use kernel's hex_to_bin() method
@ 2010-08-11 14:21 Andy Shevchenko
  2010-09-07  9:10 ` Andy Shevchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2010-08-11 14:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andy Shevchenko, Alexander Viro, linux-fsdevel

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org
---
 fs/binfmt_misc.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c
index 9e60fd2..6c3855e 100644
--- a/fs/binfmt_misc.c
+++ b/fs/binfmt_misc.c
@@ -28,6 +28,7 @@
 #include <linux/mount.h>
 #include <linux/syscalls.h>
 #include <linux/fs.h>
+#include <linux/kernel.h>
 
 #include <asm/uaccess.h>
 
@@ -244,10 +245,8 @@ static int unquote(char *from)
 	while ((c = *s++) != '\0') {
 		if (c == '\\' && *s == 'x') {
 			s++;
-			c = toupper(*s++);
-			*p = (c - (isdigit(c) ? '0' : 'A' - 10)) << 4;
-			c = toupper(*s++);
-			*p++ |= c - (isdigit(c) ? '0' : 'A' - 10);
+			*p = hex_to_bin(*s++) << 4;
+			*p++ |= hex_to_bin(*s++);
 			continue;
 		}
 		*p++ = c;
-- 
1.7.1.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] fs: use kernel's hex_to_bin() method
  2010-08-11 14:21 [PATCH] fs: use kernel's hex_to_bin() method Andy Shevchenko
@ 2010-09-07  9:10 ` Andy Shevchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Shevchenko @ 2010-09-07  9:10 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andy Shevchenko, Alexander Viro, linux-fsdevel

On Wed, Aug 11, 2010 at 5:21 PM, Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> Cc: Alexander Viro <viro@zeniv.linux.org.uk>
> Cc: linux-fsdevel@vger.kernel.org
Any comments?


-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-09-07  9:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-11 14:21 [PATCH] fs: use kernel's hex_to_bin() method Andy Shevchenko
2010-09-07  9:10 ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).