typedef struct { uint_t utf8string_len; char *utf8string_val; } utf8string; typedef utf8string component4;
So for example, to print NFSv4 file renames you have to do:
nfsv4:::op-rename-start { this->a = (char *)alloca(args[2]->oldname.utf8string_len + 1); bcopy(args[2]->oldname.utf8string_val, this->a, args[2]->oldname.utf8string_len); this->a[args[2]->oldname.utf8string_len + 1] = '\0'; this->b = (char *)alloca(args[2]->newname.utf8string_len + 1); bcopy(args[2]->newname.utf8string_val, this->b, args[2]->newname.utf8string_len); this->b[args[2]->newname.utf8string_len + 1] = '\0'; printf("NFSv4 rename: %s\n", strjoin(this->a, strjoin(" -> ", this->b))); }
Ideally DTrace (strjoin(), etc.) should deal with utf8string type automatically.