Skip to content

Commit

Permalink
Merge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
Linus Torvalds committed Jul 23, 2010
2 parents 339a2af + 58f915a commit 20a52d4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion scripts/kconfig/nconf.gui.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down
2 changes: 1 addition & 1 deletion scripts/package/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 10 additions & 6 deletions scripts/setlocalversion
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 20a52d4

Please sign in to comment.