mirror of
https://github.com/stumpwm/stumpwm-contrib.git
synced 2026-09-10 07:26:25 -04:00
Trap CL-MOUNT-INFO conditions
When CL-MOUNT-INFO can't open the file containing the mount information, /etc/mtab by default, it will signal an error. Handle the error so that StumpWM doesn't crash.
This commit is contained in:
parent
3a9629ce55
commit
12108cf29f
|
|
@ -114,14 +114,20 @@ Filesystem type
|
|||
(format nil "~a%" value)))
|
||||
|
||||
(defun disk-get-device (path)
|
||||
#+linux (cl-mount-info:mountpoint->device path)
|
||||
#+linux
|
||||
(handler-case
|
||||
(cl-mount-info:mountpoint->device path)
|
||||
(error () "ERR"))
|
||||
#-linux (disk-usage-get-field path 0))
|
||||
|
||||
(defun disk-get-mount-point (path)
|
||||
path)
|
||||
|
||||
(defun disk-get-filesystem-type (path)
|
||||
#+linux (cl-mount-info:mountpoint->fstype path)
|
||||
#+linux
|
||||
(handler-case
|
||||
(cl-mount-info:mountpoint->fstype path)
|
||||
(error () "ERR"))
|
||||
#-linux "filesystem type supported only on GNU/Linux :-(")
|
||||
|
||||
(defun use-fallback-method-p ()
|
||||
|
|
|
|||
Loading…
Reference in a new issue