9pfs: introduce v9fs_path_sprintf() helper
commite3e83f2e2130a3afbd41a2893d23397f03f6d9d0
authorGreg Kurz <groug@kaod.org>
Fri, 16 Sep 2016 06:56:15 +0000 (16 08:56 +0200)
committerGreg Kurz <groug@kaod.org>
Fri, 16 Sep 2016 06:56:15 +0000 (16 08:56 +0200)
tree86663d544b52921e0794a56bd6b88d0616439c66
parentabdf008640b7ff59ac4c08c85f76ed861290c60e
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>
hw/9pfs/9p-local.c
hw/9pfs/9p-proxy.c
hw/9pfs/9p.c
hw/9pfs/9p.h