mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-26 04:29:25 -05:00
syscalls: 'getxattr' throws upon error.
* guix/build/syscalls.scm (getxattr): Throw in the negative SIZE case.
This commit is contained in:
parent
30cc651fba
commit
836297eae5
1 changed files with 4 additions and 1 deletions
|
@ -970,7 +970,10 @@ (define getxattr
|
|||
(string->pointer key)
|
||||
(string->pointer "")
|
||||
0)))
|
||||
(cond ((< size 0) #f)
|
||||
(cond ((< size 0)
|
||||
(throw 'system-error "getxattr" "~S: ~A"
|
||||
(list file key (strerror err))
|
||||
(list err)))
|
||||
((zero? size) "")
|
||||
;; Get VALUE in buffer of SIZE. XXX actual size can race.
|
||||
(else (let*-values (((buf) (make-bytevector size))
|
||||
|
|
Loading…
Reference in a new issue