コード例 #1
0
ファイル: ctfdump.c プロジェクト: 43622538/illumos-joyent
static void
ctfdump_labels(void)
{
	ctfdump_title(CTFDUMP_LABELS, "Label Table");
	if (ctf_label_iter(g_fp, ctfdump_labels_cb, NULL) == CTF_ERR) {
		ctfdump_warn("failed to dump labels: %s\n",
		    ctf_errmsg(ctf_errno(g_fp)));
		g_exit = 1;
	}
}
コード例 #2
0
ファイル: ctf_labels.c プロジェクト: 0mp/freebsd
/*
 * Retrieve information about the label with name "lname"
 */
int
ctf_label_info(ctf_file_t *fp, const char *lname, ctf_lblinfo_t *linfo)
{
	linfo_cb_arg_t cb_arg;
	int rc;

	cb_arg.lca_name = lname;
	cb_arg.lca_info = linfo;

	if ((rc = ctf_label_iter(fp, label_info_cb, &cb_arg)) == CTF_ERR)
		return (rc);

	if (rc != 1)
		return (ctf_set_errno(fp, ECTF_NOLABEL));

	return (0);
}