tst.xlate.d revision 302408
1118459Smtm/* 2118459Smtm * CDDL HEADER START 3118459Smtm * 4118459Smtm * This file and its contents are supplied under the terms of the 5118459Smtm * Common Development and Distribution License ("CDDL"), version 1.0. 6174990Sache * You may only use this file in accordance with the terms of version 7118459Smtm * 1.0 of the CDDL. 8119188Smtm * 9119188Smtm * A full copy of the text of the CDDL should have accompanied this 10119188Smtm * source. A copy of the CDDL is also available via the Internet at 11119188Smtm * http://www.illumos.org/license/CDDL. 12119188Smtm * 13119188Smtm * CDDL HEADER END 14119188Smtm */ 15119188Smtm 16119188Smtm/* 17119188Smtm * Copyright (c) 2012 by Delphix. All rights reserved. 18119188Smtm */ 19119188Smtm 20118459Smtm#pragma D option quiet 21174990Sache 22118459Smtmtypedef struct pancakes { 23119188Smtm int i; 24119188Smtm string s; 25119188Smtm struct timespec t; 26119188Smtm} pancakes_t; 27119188Smtm 28119188Smtmtranslator pancakes_t < void *V > { 29119188Smtm i = 2 * 10; 30119188Smtm s = strjoin("I like ", "pancakes"); 31119188Smtm t = *(struct timespec *)`dtrace_zero; 32119188Smtm}; 33119188Smtm 34119188SmtmBEGIN 35118459Smtm{ 36118459Smtm print(*(xlate < pancakes_t * > ((void *)NULL))); 37118459Smtm} 38118459Smtm 39118459SmtmBEGIN 40118459Smtm{ 41118459Smtm exit(0); 42118459Smtm} 43118459Smtm