mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
[virtio-9p] Make rpath thread safe
Current rpath inline function is heavily used in all system calls. This function has a static buffer making it a non-thread safe function. This patch introduces new thread-safe routine and makes use of it. Signed-off-by: Venkateswararao Jujjuri "<jvrao@linux.vnet.ibm.com>
This commit is contained in:
parent
873c321393
commit
faa44e3d3e
7 changed files with 98 additions and 92 deletions
|
@ -97,11 +97,4 @@ typedef struct FileOperations
|
|||
void *opaque;
|
||||
} FileOperations;
|
||||
|
||||
static inline const char *rpath(FsContext *ctx, const char *path)
|
||||
{
|
||||
/* FIXME: so wrong... */
|
||||
static char buffer[4096];
|
||||
snprintf(buffer, sizeof(buffer), "%s/%s", ctx->fs_root, path);
|
||||
return buffer;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue