2 .\" Copyright (c) 2020 M Warner Losh
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
13 .\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
14 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
15 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
16 .\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
17 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 .Dd September 22, 2020
31 .Nd Send a message, via devctl, to userland
35 .Fn devctl_notify "const char *system" "const char *subsystem" "const char *type" "const char *data"
37 Send a notification to user land via
41 for the format of these messages.
45 function creates a string using the following template:
47 snprintf(buffer, sizeof(buffer), "!system=%s subsystem=%s type=%s",
48 system, subsystem, type);
56 pointers cannot be NULL.
60 argument may be NULL (for no additions) or a message formatted
63 A space will be added to the above template and this argument copied
64 verbatim to form the message passed to userland.
65 Senders should balance between only passing data that userland can not
66 discover itself and sending all the data userland will want to use to
67 decide what to do with the message.
69 The current total message length limit is just under 1kb.
70 Senders should try to remain well below this limit.
75 This manual page was written by