diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-11-19 21:17:22 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-11-19 21:17:22 -0500 |
commit | 15916de835a683bd8133a0d1ac0c982b795ab4ff (patch) | |
tree | 20603c2e0cade00d2e40a3b5390f5def36a02711 /fs/btrfs/version.sh | |
parent | ae20a6afec1cf21919d97303f2d8b737eac5acc7 (diff) |
Btrfs: Fixes for 2.6.28-rc API changes
* open/close_bdev_excl -> open/close_bdev_exclusive
* blkdev_issue_discard takes a GFP mask now
* Fix blkdev_issue_discard usage now that it is enabled
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/version.sh')
-rw-r--r-- | fs/btrfs/version.sh | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/fs/btrfs/version.sh b/fs/btrfs/version.sh index 0f57f24404d9..1ca1952fd917 100644 --- a/fs/btrfs/version.sh +++ b/fs/btrfs/version.sh | |||
@@ -8,24 +8,24 @@ | |||
8 | 8 | ||
9 | v="v0.16" | 9 | v="v0.16" |
10 | 10 | ||
11 | which hg > /dev/null | 11 | which git &> /dev/null |
12 | if [ -d .hg ] && [ $? == 0 ]; then | 12 | if [ $? == 0 ]; then |
13 | last=$(hg tags | grep -m1 -o '^v[0-9.]\+') | 13 | git branch >& /dev/null |
14 | 14 | if [ $? == 0 ]; then | |
15 | # now check if the repo has commits since then... | 15 | if head=`git rev-parse --verify HEAD 2>/dev/null`; then |
16 | if [[ $(hg id -t) == $last || \ | 16 | if tag=`git describe --tags 2>/dev/null`; then |
17 | $(hg di -r "$last:." | awk '/^diff/{print $NF}' | sort -u) == .hgtags ]] | 17 | v="$tag" |
18 | then | 18 | fi |
19 | # check if it's dirty | 19 | |
20 | if [[ $(hg id | cut -d' ' -f1) == *+ ]]; then | 20 | # Are there uncommitted changes? |
21 | v=$last+ | 21 | git update-index --refresh --unmerged > /dev/null |
22 | else | 22 | if git diff-index --name-only HEAD | \ |
23 | v=$last | 23 | grep -v "^scripts/package" \ |
24 | | read dummy; then | ||
25 | v="$v"-dirty | ||
26 | fi | ||
24 | fi | 27 | fi |
25 | else | 28 | fi |
26 | # includes dirty flag | ||
27 | v=$last+$(hg id -i) | ||
28 | fi | ||
29 | fi | 29 | fi |
30 | 30 | ||
31 | echo "#ifndef __BUILD_VERSION" > .build-version.h | 31 | echo "#ifndef __BUILD_VERSION" > .build-version.h |