Lines Matching refs:tracefile
74 const char *tracefile;
80 tracefile = def_tracefile;
96 tracefile = optarg;
142 if (ktrace(tracefile, ops, trpoints, pid) < 0)
143 err(1, "%s", tracefile);
149 if ((fd = open(tracefile, O_CREAT | O_WRONLY | O_NONBLOCK,
151 err(1, "%s", tracefile);
154 tracefile);
156 errx(1, "%s not regular file", tracefile);
158 if (unlink(tracefile) == -1 && errno != ENOENT)
159 err(1, "unlink %s", tracefile);
160 if ((fd = open(tracefile, O_CREAT | O_EXCL | O_WRONLY,
162 err(1, "%s", tracefile);
170 if (ktrace(tracefile, ops, trpoints, getpid()) < 0)
171 err(1, "%s", tracefile);
175 if (ktrace(tracefile, ops, trpoints, pid) < 0)
176 err(1, "%s", tracefile);