From 5a9446604f9fea441fd20d3c37eace5329307ab4 Mon Sep 17 00:00:00 2001 From: Peter Bex Date: Tue, 7 May 2013 19:23:12 +0200 Subject: Don't try to print details of closed BPF objects --- bpf-interface.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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-interface obj))) + (if (bpf-fd obj) + (fprintf out "#" (bpf-interface obj)) + (display "#" out))) (define (bpf-open interface #!optional buffer-length) (let lp ((i -1) -- cgit v1.2.3