diff options
author | Robert Mustacchi <rm@joyent.com> | 2018-12-20 19:00:37 +0000 |
---|---|---|
committer | Richard Lowe <richlowe@richlowe.net> | 2019-08-19 22:32:45 +0000 |
commit | 5b6e8d437b064342671e0a40b3146d7f98802a64 (patch) | |
tree | eec8892d8b832a1ec7d4374bf05f2e92c91a8fb4 | |
parent | e7a617a7b674323dacb8a0d3ac64c275c7a72b0c (diff) | |
download | illumos-joyent-5b6e8d437b064342671e0a40b3146d7f98802a64.tar.gz |
11544 ofmt(3OFMT) should talk about the callback handler
Reviewed by: Dan McDonald <danmcd@joyent.com>
Reviewed by: Jason King <jason.brian.king@gmail.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
-rw-r--r-- | usr/src/man/man3ofmt/ofmt.3ofmt | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/usr/src/man/man3ofmt/ofmt.3ofmt b/usr/src/man/man3ofmt/ofmt.3ofmt index 99b431f014..bc996dafa1 100644 --- a/usr/src/man/man3ofmt/ofmt.3ofmt +++ b/usr/src/man/man3ofmt/ofmt.3ofmt @@ -11,8 +11,9 @@ .\" .\" Copyright 2010 Sun Microsystems, Inc. All rights reserved. .\" Copyright 2017 Nexenta Systems, Inc. +.\" Copyright 2018 Joyent, Inc. .\" -.Dd June 1, 2017 +.Dd December 20, 2018 .Dt OFMT 3OFMT .Os .Sh NAME @@ -158,9 +159,21 @@ as follows: is the application-specified callback function with the following prototype that provides a string representation of the value to be printed for the field: .Bd -literal -offset indent -(*of_cb)(ofmt_arg_t *ofmt_arg, char *buf, uint_t bufsize) +boolean_t (*of_cb)(ofmt_arg_t *ofmt_arg, char *buf, uint_t bufsize) .Ed .Pp +The callback must not write beyond +.Fa bufsize +bytes of the string form into +.Fa buf . +If the function successfully translates the field into its string +representation and places it into +.Fa buf , +then the callback function should return +.Dv B_TRUE . +Otherwise, the callback function should return +.Dv B_FALSE . +.Pp The interpretation of the .Va of_id field is completely private to the caller, and can be optionally used by the |