Trim leading "../" sequences from filenames.

This commit is contained in:
John Baldwin 2003-03-11 19:56:16 +00:00
parent 2089c5c95e
commit 4c6ffc94c0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=112105

View File

@ -216,6 +216,9 @@ ktr_tracepoint(u_int mask, const char *file, int line, const char *format,
#endif
entry->ktr_timestamp = KTR_TIME;
entry->ktr_cpu = cpu;
if (file != NULL)
while (strncmp(file, "../", 3) == 0)
file += 3;
entry->ktr_file = file;
entry->ktr_line = line;
#ifdef KTR_VERBOSE