summaryrefslogtreecommitdiffstats
path: root/usr
pre { line-height: 125%; } td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-ri
AgeCommit message (Expand)Author
2011-04-18initramfs: Use KBUILD_BUILD_TIMESTAMP for generated entriesMichal Marek
2011-01-20kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERTDavid Rientjes
2011-01-13decompressors: add boot-time XZ supportLasse Collin
2011-01-10Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek...Linus Torvalds
2011-01-05gen_init_cpio: checkpatch fixesAndrew Morton
2010-12-29gen_init_cpio: Avoid race between call to stat() and call to open()Jesper Juhl
2010-12-14Merge commit 'v2.6.37-rc1' into kbuild/kbuildMichal Marek
2010-12-02gen_init_cpio: remove leading `/' from file namesThomas Chou
2010-12-01initramfs: Really fix build break on symbol-prefixed archsHendrik Brueckner
2010-10-31initramfs: Fix initramfs size for 32-bit archesGeert Uytterhoeven
2010-10-28Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek...Linus Torvalds
2010-09-29initramfs: fix initramfs size calculationHendrik Brueckner
2010-09-29initramfs: generalize initramfs_data.xxx.S variantsHendrik Brueckner
2010-08-23Kconfig: delete duplicate wordStephan Sperber
2010-05-27initramfs: add support for in-kernel initramfs compressed with LZOAlbin Tonnerre
2010-01-11Add LZO compression support for initramfs and old-style initrdAlbin Tonnerre
2009-12-12gen_init_cpio: fixed fwrite warningMike Frysinger
2009-09-23Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-nextLinus Torvalds
2009-09-23Fix all -Wmissing-prototypes warnings in x86 defconfigTrevor Keith
2009-09-20gitignore usr/initramfs_data.cpio.bz2 and usr/initramfs_data.cpio.lzmaJaswinder Singh Rajput
2009-09-20kbuild: correct initramfs compression commentRobert P. J. Day
2009-03-31bzip2/lzma: quiet Kconfig warning for INITRAMFS_COMPRESSION_NONEH. Peter Anvin
2009-03-28bzip2/lzma: don't ask for compression mode for the default initramfsH. Peter Anvin
2009-03-28bzip2/lzma: consistently capitalize LZMA in KconfigH. Peter Anvin
2009-03-28bzip2/lzma: clarify the meaning of the CONFIG_RD_ optionsH. Peter Anvin
2009-03-28bzip2/lzma: move CONFIG_RD_* options under CONFIG_EMBEDDEDH. Peter Anvin
2009-02-19bzip2/lzma: make internal initramfs compression configurableAlain Knaff
2009-01-07bzip2/lzma: fix built-in initramfs vs CONFIG_RD_GZIPAlain Knaff
2009-01-07bzip2/lzma: move initrd/ramfs options out of BLK_DEVH. Peter Anvin
2007-07-16kbuild: add support for reading stdin with gen_init_cpioMike Frysinger
2007-07-16.gitignore updateAlexey Dobriyan
2007-05-02usr/Kconfig: fix typoAlexander E. Patrakov
2007-02-11[PATCH] usr/gen_init_cpio.c: support for hard linksLuciano Rocha
2007-02-11[PATCH] disable init/initramfs.cJean-Paul Saman
2006-11-25[PATCH] initramfs: handle more than one source dir or file listThomas Chou
2006-09-25kbuild: consistently decide when to rebuild a targetSam Ravnborg
2006-08-07kbuild: do not try to build content of initramfsSam Ravnborg
2006-06-10kbuild: bugfix with initramfsNickolay
2006-04-19[PATCH] Fix potential NULL pointer deref in gen_init_cpioJesper Juhl
2006-04-11kbuild: rebuild initramfs if content of initramfs changesSam Ravnborg
2005-10-18Add some basic .gitignore filesLinus Torvalds
2005-08-10kconfig: move initramfs options to General SetupSam Ravnborg
2005-07-25kbuild: introduce Kbuild.includeSam Ravnborg
2005-04-16Linux-2.6.12-rc2Linus Torvalds
.highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#!/bin/bash

#
# check-files
#
scriptname=check-files
if ! MYTMP=$(mktemp -d -t $scriptname-XXXXXX)
then
            echo >&2
            echo >&2
            echo >&2 "Cannot create temporary directory."
            echo >&2
            exit 1
fi

cleanup() {
  status=$?
  rm -rf "${MYTMP}"
  exit $status
}

# clean up if we get stopped by Crtl-C or forced logout or normal exit
trap cleanup INT
trap cleanup HUP
trap cleanup 0

set -e
if [ "$1" = "--debug" ]
then
  set -x
  shift
fi

if [ $# -lt 1 ]
then
  echo "check-files [--debug] -|filenames"
  echo "e.g."
  echo "  git diff | ./packaging/check-files -"
  echo "or in .git/hooks/pre-commit:"
  echo "  exec git diff --cached | ./packaging/check-files -"
  exit 1
fi

if [ ! -x packaging/check-files ]
then
  echo "Must be run from base directory"
  exit 1
fi

if [ "$1" = "-" ]
then
  from_cache=Y
  f=""
else
  from_cache=
  for f in "$@"
  do
    if [ ! -f "$f" ]
    then
      echo "$f: no such file"
      exit 1
    fi
  done

  git status --porcelain "$@" | grep "^?" | cut -c4- > $MYTMP/missing.lst

  while read missing
  do
     git update-index --add --cacheinfo \
          100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 $missing
  done < $MYTMP/missing.lst

  empty_tree=4b825dc642cb6eb9a060e54bf8d69288fbee4904
  git diff $empty_tree -- "$@" > $MYTMP/diff.full
  f=$MYTMP/diff.full

  while read missing
  do
     git update-index --force-remove $missing
  done < $MYTMP/missing.lst
fi

> $MYTMP/diff.lst sed -e "/^+++ b/{p;s:^+++ b/::;w $MYTMP/files.lst" -e "d;}" $f

#cat $MYTMP/diff.lst
#cat $MYTMP/files.lst

dirname="${0%/*}"
if [ "$dirname" = "$0" ]; then dirname="."; fi

for i in $dirname/*.functions $dirname/*/*.functions
do
  if [ -f "$i" ]
  then
    source $i
    echo $i | sed -e 's:.*/::' -e 's/\.functions$//' -e 's/\./_/g' >> $MYTMP/fns
  fi
done

status=0
while read fn
do
  "${fn}_check_init" $filename || status=1
done < $MYTMP/fns

while read filename
do
  #echo Checking $filename
  while read fn
  do
    if [ $status -eq 0 ]
    then
      "${fn}_check_file" $filename || status=1
    fi
  done < $MYTMP/fns
done < $MYTMP/files.lst

if [ $status -eq 0 ]
then
  while read fn
  do
    "${fn}_check_fin" $filename || status=1
  done < $MYTMP/fns
fi

exit $status