syscalls: statfs: Add missing 'mount-flags' field of 'struct statfs'.

* guix/build/syscalls.scm (<file-system>)[mount-flags]: New field.
[spare2]: Remove.
(%statfs): Likewise.
This commit is contained in:
Ludovic Courtès 2016-04-30 23:30:56 +02:00 committed by 宋文武
parent c7794307f1
commit e19eb93b85

View file

@ -59,6 +59,7 @@ (define-module (guix build syscalls)
file-system-identifier file-system-identifier
file-system-maximum-name-length file-system-maximum-name-length
file-system-fragment-size file-system-fragment-size
file-system-mount-flags
statfs statfs
processes processes
@ -475,8 +476,7 @@ (define mkdtemp!
(define-record-type <file-system> (define-record-type <file-system>
(file-system type block-size blocks blocks-free (file-system type block-size blocks blocks-free
blocks-available files free-files identifier blocks-available files free-files identifier
name-length fragment-size name-length fragment-size mount-flags spare0 spare1)
spare0 spare1 spare2)
file-system? file-system?
(type file-system-type) (type file-system-type)
(block-size file-system-block-size) (block-size file-system-block-size)
@ -488,14 +488,14 @@ (define-record-type <file-system>
(identifier file-system-identifier) (identifier file-system-identifier)
(name-length file-system-maximum-name-length) (name-length file-system-maximum-name-length)
(fragment-size file-system-fragment-size) (fragment-size file-system-fragment-size)
(mount-flags file-system-mount-flags)
(spare0 file-system--spare0) (spare0 file-system--spare0)
(spare1 file-system--spare1) (spare1 file-system--spare1))
(spare2 file-system--spare2))
(define-syntax fsword ;fsword_t (define-syntax fsword ;fsword_t
(identifier-syntax long)) (identifier-syntax long))
(define-c-struct %statfs (define-c-struct %statfs ;<bits/statfs.h>
sizeof-statfs ;slightly overestimated sizeof-statfs ;slightly overestimated
file-system file-system
read-statfs read-statfs
@ -510,9 +510,9 @@ (define-c-struct %statfs
(identifier uint64) ;really "int[2]" (identifier uint64) ;really "int[2]"
(name-length fsword) (name-length fsword)
(fragment-size fsword) (fragment-size fsword)
(mount-flags fsword)
(spare0 int128) ;really "fsword[4]" (spare0 int128) ;really "fsword[4]"
(spare1 int128) (spare1 int128))
(spare2 int64)) ;XXX: to match array alignment
(define statfs (define statfs
(let ((proc (syscall->procedure int "statfs" '(* *)))) (let ((proc (syscall->procedure int "statfs" '(* *))))