diff options
-rw-r--r-- | bpf-interface.scm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bpf-interface.scm b/bpf-interface.scm index 5a3be0c..3f9e47a 100644 --- a/bpf-interface.scm +++ b/bpf-interface.scm @@ -51,7 +51,9 @@ (define-record bpf fd) (define-record-printer (bpf obj out) - (fprintf out "#<bpf on interface: ~S>" (bpf-interface obj))) + (if (bpf-fd obj) + (fprintf out "#<bpf on interface: ~S>" (bpf-interface obj)) + (display "#<bpf (closed)>" out))) (define (bpf-open interface #!optional buffer-length) (let lp ((i -1) |