guix_mirror_bot pushed a commit to branch master
in repository guix.

commit 1bd2dd9020d9c4844c9be32be358cf832d6696a8
Author: Ludovic Courtès <[email protected]>
AuthorDate: Fri Jan 9 23:17:57 2026 +0100

    services: static-networking: Tweak error messages.
    
    * gnu/services/base.scm (assert-network-link-mac-address): Change error
    message string to conform to standards.
    (assert-network-link-type): Change to ‘define-with-syntax-properties’ since
    previously it would reject a non-literal symbol.  Adjust message string.
    
    Change-Id: I0a8b9d7512ca7567f9d60eb15ad6fb4e05020e48
    Signed-off-by: Ludovic Courtès <[email protected]>
---
 gnu/services/base.scm | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 1117c761e8..40f3c7c7e2 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -3189,21 +3189,21 @@ Write, say, @samp{\"~a/24\"} for a 24-bit network 
mask.")
    ((and (string? value) (mac-address? value)) value)
    (else (raise
           (make-compound-condition
-           (formatted-message (G_ "Value (~S) is not a valid mac address.~%")
+           (formatted-message (G_ "~s: invalid MAC address")
                               value)
            (condition (&error-location
                        (location (source-properties->location 
procedure-call-location)))))))))
 
-(define-compile-time-procedure (assert-network-link-type (value identity))
+(define-with-syntax-properties (assert-network-link-type (value properties))
   (match value
     (#f value)
-    (('quote _) (datum->syntax #'value value))
-    (else
+    ((? symbol?) value)
+    (_
      (raise
       (make-compound-condition
-       (formatted-message (G_ "Value (~S) is not a symbol.~%") value)
+       (formatted-message (G_ "~s: invalid link type") value)
        (condition (&error-location
-                   (location (source-properties->location 
procedure-call-location)))))))))
+                   (location (source-properties->location properties)))))))))
 
 (define-record-type* <static-networking>
   static-networking make-static-networking

Reply via email to