mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-31 14:56:54 +01:00
system: Add /dev/shm.
* gnu/system/file-systems.scm (%shared-memory-file-system): New variable. (%base-file-systems): Add it. * doc/guix.texi (File Systems): Document it.
This commit is contained in:
parent
2c071ce96e
commit
db17ae5c27
2 changed files with 19 additions and 1 deletions
|
@ -3084,6 +3084,12 @@ Manual}). Pseudo-terminals are used by terminal emulators such as
|
||||||
@command{xterm}.
|
@command{xterm}.
|
||||||
@end defvr
|
@end defvr
|
||||||
|
|
||||||
|
@defvr {Scheme Variable} %shared-memory-file-system
|
||||||
|
This file system is mounted as @file{/dev/shm} and is used to support
|
||||||
|
memory sharing across processes (@pxref{Memory-mapped I/O,
|
||||||
|
@code{shm_open},, libc, The GNU C Library Reference Manual}).
|
||||||
|
@end defvr
|
||||||
|
|
||||||
@defvr {Scheme Variable} %binary-format-file-system
|
@defvr {Scheme Variable} %binary-format-file-system
|
||||||
The @code{binfmt_misc} file system, which allows handling of arbitrary
|
The @code{binfmt_misc} file system, which allows handling of arbitrary
|
||||||
executable file types to be delegated to user space. This requires the
|
executable file types to be delegated to user space. This requires the
|
||||||
|
|
|
@ -108,10 +108,22 @@ (define %pseudo-terminal-file-system
|
||||||
(create-mount-point? #t)
|
(create-mount-point? #t)
|
||||||
(options (string-append "gid=" (number->string %tty-gid) ",mode=620"))))
|
(options (string-append "gid=" (number->string %tty-gid) ",mode=620"))))
|
||||||
|
|
||||||
|
(define %shared-memory-file-system
|
||||||
|
;; Shared memory.
|
||||||
|
(file-system
|
||||||
|
(device "tmpfs")
|
||||||
|
(mount-point "/dev/shm")
|
||||||
|
(type "tmpfs")
|
||||||
|
(check? #f)
|
||||||
|
(flags '(no-suid no-dev))
|
||||||
|
(options "size=50%") ;TODO: make size configurable
|
||||||
|
(create-mount-point? #t)))
|
||||||
|
|
||||||
(define %base-file-systems
|
(define %base-file-systems
|
||||||
;; List of basic file systems to be mounted. Note that /proc and /sys are
|
;; List of basic file systems to be mounted. Note that /proc and /sys are
|
||||||
;; currently mounted by the initrd.
|
;; currently mounted by the initrd.
|
||||||
(list %devtmpfs-file-system
|
(list %devtmpfs-file-system
|
||||||
%pseudo-terminal-file-system))
|
%pseudo-terminal-file-system
|
||||||
|
%shared-memory-file-system))
|
||||||
|
|
||||||
;;; file-systems.scm ends here
|
;;; file-systems.scm ends here
|
||||||
|
|
Loading…
Reference in a new issue