diff options
author | Greg Kurz <groug@kaod.org> | 2016-09-16 08:56:15 +0200 |
---|---|---|
committer | Greg Kurz <groug@kaod.org> | 2016-09-16 08:56:15 +0200 |
commit | e3e83f2e2130a3afbd41a2893d23397f03f6d9d0 (patch) | |
tree | 86663d544b52921e0794a56bd6b88d0616439c66 /hw/9pfs/9p.h | |
parent | abdf008640b7ff59ac4c08c85f76ed861290c60e (diff) |
9pfs: introduce v9fs_path_sprintf() helper
This helper is similar to v9fs_string_sprintf(), but it includes the
terminating NUL character in the size field.
This is to avoid doing v9fs_string_sprintf((V9fsString *) &path) and
then bumping the size.
Affected users are changed to use this new helper.
Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'hw/9pfs/9p.h')
-rw-r--r-- | hw/9pfs/9p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/9pfs/9p.h b/hw/9pfs/9p.h index a38603398e..d539d2ebe9 100644 --- a/hw/9pfs/9p.h +++ b/hw/9pfs/9p.h @@ -327,6 +327,7 @@ static inline uint8_t v9fs_request_cancelled(V9fsPDU *pdu) extern void v9fs_reclaim_fd(V9fsPDU *pdu); extern void v9fs_path_init(V9fsPath *path); extern void v9fs_path_free(V9fsPath *path); +extern void v9fs_path_sprintf(V9fsPath *path, const char *fmt, ...); extern void v9fs_path_copy(V9fsPath *lhs, V9fsPath *rhs); extern int v9fs_name_to_path(V9fsState *s, V9fsPath *dirpath, const char *name, V9fsPath *path); |