diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2026-01-09 23:17:57 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2026-02-06 20:49:02 +0100 |
| commit | 1bd2dd9020d9c4844c9be32be358cf832d6696a8 (patch) | |
| tree | 33ee680449c15d1f16cb9068a447894b93c0b04e /gnu/services | |
| parent | b61e6847415fbeaea8a3ed16471a5ea8b3fe77d6 (diff) | |
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 <ludo@gnu.org>
Diffstat (limited to 'gnu/services')
| -rw-r--r-- | gnu/services/base.scm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 1117c761e84..40f3c7c7e2e 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.") | |||
| 3189 | ((and (string? value) (mac-address? value)) value) | 3189 | ((and (string? value) (mac-address? value)) value) |
| 3190 | (else (raise | 3190 | (else (raise |
| 3191 | (make-compound-condition | 3191 | (make-compound-condition |
| 3192 | (formatted-message (G_ "Value (~S) is not a valid mac address.~%") | 3192 | (formatted-message (G_ "~s: invalid MAC address") |
| 3193 | value) | 3193 | value) |
| 3194 | (condition (&error-location | 3194 | (condition (&error-location |
| 3195 | (location (source-properties->location procedure-call-location))))))))) | 3195 | (location (source-properties->location procedure-call-location))))))))) |
| 3196 | 3196 | ||
| 3197 | (define-compile-time-procedure (assert-network-link-type (value identity)) | 3197 | (define-with-syntax-properties (assert-network-link-type (value properties)) |
| 3198 | (match value | 3198 | (match value |
| 3199 | (#f value) | 3199 | (#f value) |
| 3200 | (('quote _) (datum->syntax #'value value)) | 3200 | ((? symbol?) value) |
| 3201 | (else | 3201 | (_ |
| 3202 | (raise | 3202 | (raise |
| 3203 | (make-compound-condition | 3203 | (make-compound-condition |
| 3204 | (formatted-message (G_ "Value (~S) is not a symbol.~%") value) | 3204 | (formatted-message (G_ "~s: invalid link type") value) |
| 3205 | (condition (&error-location | 3205 | (condition (&error-location |
| 3206 | (location (source-properties->location procedure-call-location))))))))) | 3206 | (location (source-properties->location properties))))))))) |
| 3207 | 3207 | ||
| 3208 | (define-record-type* <static-networking> | 3208 | (define-record-type* <static-networking> |
| 3209 | static-networking make-static-networking | 3209 | static-networking make-static-networking |
