git: DragonFly_RELEASE_4_0 drm: Use the ERESTARTSYS error code

Francois Tigeot ftigeot at crater.dragonflybsd.org
Tue Nov 18 15:07:22 PST 2014


commit b0c3948b7bda9ab43188bc0e7b1d4b34874b749c
Author: François Tigeot <ftigeot at wolfpond.org>
Date:   Sun Nov 16 23:14:17 2014 +0100

    drm: Use the ERESTARTSYS error code
    
    * Linux kernel functions can return -ERESTARTSYS in some cases, a
      negative value indicating an error (typically -512)
    
    * Howewer, ERESTARTSYS was previously as ERESTART, itself defined
      as -1 in *BSD kernels
    
    * The -ERESTARTSYS return value thus was positive on the DragonFly
      kernel, potentially breaking various drm error checks.
    
    * Fix this issue by defining ERESTARTSYS separately
    
    Thanks-to: Imre Vadasz for discovering the original problem

Summary of changes:
 sys/dev/drm/i915/i915_gem.c                    |  2 +-
 sys/dev/drm/include/drm/drm_os_freebsd.h       |  1 -
 sys/dev/drm/include/linux/completion.h         |  2 +-
 sys/dev/drm/include/linux/{mutex.h => errno.h} | 12 ++++++------
 sys/dev/drm/radeon/radeon_gem.c                |  2 +-
 sys/dev/drm/ttm/ttm_bo.c                       | 19 +++++++++----------
 sys/dev/drm/ttm/ttm_bo_vm.c                    |  3 ++-
 sys/dev/drm/ttm/ttm_lock.c                     |  4 ++--
 8 files changed, 22 insertions(+), 23 deletions(-)
 copy sys/dev/drm/include/linux/{mutex.h => errno.h} (88%)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/b0c3948b7bda9ab43188bc0e7b1d4b34874b749c


-- 
DragonFly BSD source repository



More information about the Commits mailing list