2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-22 12:14:01 +08:00

Merge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6

* 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
  nconfig: Fix segfault when help contains special characters
  kbuild: Fix make rpm
  kbuild: Make the setlocalversion script POSIX-compliant
This commit is contained in:
Linus Torvalds 2010-07-23 13:25:00 -07:00
commit 20a52d4f59
3 changed files with 12 additions and 8 deletions

View File

@ -226,7 +226,7 @@ void fill_window(WINDOW *win, const char *text)
int len = get_line_length(line);
strncpy(tmp, line, min(len, x));
tmp[len] = '\0';
mvwprintw(win, i, 0, tmp);
mvwprintw(win, i, 0, "%s", tmp);
}
}

View File

@ -44,7 +44,7 @@ rpm-pkg rpm: $(objtree)/kernel.spec FORCE
fi
$(MAKE) clean
$(PREV) ln -sf $(srctree) $(KERNELPATH)
$(CONFIG_SHELL) $(srctree)/scripts/setlocalversion --scm-only > $(objtree)/.scmversion
$(CONFIG_SHELL) $(srctree)/scripts/setlocalversion --save-scmversion
$(PREV) tar -cz $(RCS_TAR_IGNORE) -f $(KERNELPATH).tar.gz $(KERNELPATH)/.
$(PREV) rm $(KERNELPATH)
rm -f $(objtree)/.scmversion

View File

@ -10,13 +10,13 @@
#
usage() {
echo "Usage: $0 [--scm-only] [srctree]" >&2
echo "Usage: $0 [--save-scmversion] [srctree]" >&2
exit 1
}
scm_only=false
srctree=.
if test "$1" = "--scm-only"; then
if test "$1" = "--save-scmversion"; then
scm_only=true
shift
fi
@ -30,11 +30,12 @@ fi
scm_version()
{
local short=false
local short
short=false
cd "$srctree"
if test -e .scmversion; then
cat "$_"
cat .scmversion
return
fi
if test "$1" = "--short"; then
@ -131,12 +132,15 @@ collect_files()
}
if $scm_only; then
scm_version
if test ! -e .scmversion; then
res=$(scm_version)
echo "$res" >.scmversion
fi
exit
fi
if test -e include/config/auto.conf; then
source "$_"
. include/config/auto.conf
else
echo "Error: kernelrelease not valid - run 'make prepare' to update it"
exit 1