summaryrefslogtreecommitdiff
path: root/.zsh/sourcedir
blob: d4c627fe11e6d4fdd2e09ffc730c08870e5c4919 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# sourcedir
#
# Defines helper function to source files in a directory
#
# Copyright © 1994-2008 martin f. krafft <madduck@madduck.net>
# Released under the terms of the Artistic Licence 2.0
#
# Source repository: git://git.madduck.net/etc/zsh.git
#

. $ZDOTDIR/logging

sourcedir() {
  if [ ! -d "$1" ]; then
    error "no such directory: $1"
    return 1
  fi

  for f in "$1"/*(.N,@N); do
    case "$f" in
      *~|*.bak|*.old|*.sw?|*.zwc|*.disabled) continue;;
    esac

    source "$f"
  done
}

# vim:ft=zsh
eb91a4f0120da214a52e056'>718733cb1bdaea6feb4a831e14838d03d19ef85c parentab3ab68493aaac6fea4ad1bb597def9f48f41c71 (diff)
drm/msm: deal with exhausted vmap space better
Some, but not all, callers of obj->vmap() would check if return IS_ERR(). So let's actually return an error if vmap() fails. And fixup the call-sites that were not handling this properly. Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat