<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Joerg Vehlow <<a href="mailto:lkml@jv-coder.de">lkml@jv-coder.de</a>> wrote:<br></div><div dir="ltr" class="gmail_attr"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail_default" style="font-size:small">...</span><br>
<br>
int main(void)<br>
{<br>
- char tmpfname[256];<br>
+ char tmpfname[PATH_MAX];<br>
#define BUF_SIZE 1024<br>
char buf[BUF_SIZE];<br>
struct timespec processing_completion_ts = {0, 10000000};<br>
@@ -46,8 +47,7 @@ int main(void)<br>
if (sysconf(_SC_ASYNCHRONOUS_IO) < 200112L)<br>
return PTS_UNSUPPORTED;<br>
<br>
- snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_aio_cancel_1_1_%d",<br>
- getpid());<br>
+ <span class="gmail_default" style="font-size:small"></span>LTP_GET_TMP_FILENAME(tmpfname, "<span class="gmail_default" style="font-size:small"></span>pts_aio_cancel_1_1");<br></blockquote><div><br></div><div class="gmail_default" style="font-size:small">It'd be great if a passing string end with the suffix "_", be used to clearly distinguish the PID number.</div></div><div><br></div><div><div class="gmail_default" style="font-size:small">Something like:</div></div><div><div class="gmail_default" style="font-size:small"> <span class="gmail_default"></span>LTP_GET_TMP_FILENAME(tmpfname, "pts_aio_cancel_1_1_");</div></div><div><br></div><div><div class="gmail_default" style="font-size:small">This comment applies to all of the changing files in this patch, or we can modify it in the macro prototype.</div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div></div>