lkml.org 
[lkml]   [2004]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[TRIVIAL] avoid "expr length" (improved version)
From
Date
 From:  Martin Schaffner <maschaffner@gmx.ch>

---
I improved my patch to avoid the "expr length" GNU-ism. It should be
much clearer now. It uses "wc -c" to count the letters.

Thanks,
Martin


--- trivial-2.6.5-rc2-bk2/Makefile.orig 2004-03-23 10:11:35.000000000 +1100
+++ trivial-2.6.5-rc2-bk2/Makefile 2004-03-23 10:11:35.000000000 +1100
@@ -652,7 +652,7 @@
uts_len := 64

define filechk_version.h
- if expr length "$(KERNELRELEASE)" \> $(uts_len) >/dev/null ; then \
+ if ((`echo -n "$(KERNELRELEASE)" | wc -c ` > $(uts_len))); then \
echo '"$(KERNELRELEASE)" exceeds $(uts_len) characters' >&2; \
exit 1; \
fi; \
--
What is this? http://www.kernel.org/pub/linux/kernel/people/rusty/trivial/
Don't blame me: the Monkey is driving
File: Martin Schaffner <maschaffner@gmx.ch>: [PATCH] avoid "expr length" (improved version)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:01    [W:0.037 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site