addr: Fix display for flags and scope

Julien LepillerSun Mar 14 03:53:57+0100 2021

1fb04b4

addr: Fix display for flags and scope

ip/addr.scm

186186
       (format #t " brd ~a" brd))
187187
     (when scope
188188
       (format #t " scope ~a"
189-
               (match scope
190-
                 (RT_SCOPE_UNIVERSE "global")
191-
                 (_ (substring (symbol->string (int->rtm-scope scope)) 8)))))
189+
               (cond
190+
                 ((equal? scope RT_SCOPE_UNIVERSE) "global")
191+
                 (else (string-downcase
192+
                         (substring (symbol->string (int->rtm-scope scope))
193+
                                    9))))))
192194
193195
     (for-each
194196
       (lambda (flag)
195197
         (unless (equal? flag 'IFA_F_PERMANENT)
196198
           (format #t " ~a"
197-
                   (substring (symbol->string flag) 6))))
199+
                   (string-downcase (substring (symbol->string flag) 6)))))
198200
       flags)
199201
200202
     (when label