Flexible I/O Tester development
 help / color / mirror / Atom feed
* Surprising use of basename in finish_log_named
@ 2014-04-01 15:00 Erwan Velu
  2014-04-01 18:49 ` Jens Axboe
  0 siblings, 1 reply; 4+ messages in thread
From: Erwan Velu @ 2014-04-01 15:00 UTC (permalink / raw)
  To: fio

Hi Jens,

I had a input of the fio irc channel (yes some at getting into it 
sometimes :p), and he had a very interesting point.

If you specify a full path name for the iops_log, the file will stay 
into the current dir.
While looking at the code I found that finish_log_named() is performing 
the following:

     char file_name[256], *p;
     snprintf(file_name, sizeof(file_name), "%s_%s.log", prefix, postfix);
     p = basename(file_name);

Why do we basename the file_name ? What's the reason of shrinking the 
path this way ?

Note for the author: 256 is maybe too small for some ? :)))

Cheers,
Erwan

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-04-02 13:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-01 15:00 Surprising use of basename in finish_log_named Erwan Velu
2014-04-01 18:49 ` Jens Axboe
2014-04-02  8:11   ` Erwan Velu
2014-04-02 13:44     ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox