libzfs: return (allocated) strings instead of filling buffers

This also expands the zfs version output from 127 characters to However
Many Are Actually Set

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13330
This commit is contained in:
наб
2022-04-15 00:00:02 +02:00
committed by Brian Behlendorf
parent 38f4d99f76
commit 2b4f2fc93c
7 changed files with 1427 additions and 1442 deletions
+2 -2
View File
@@ -914,8 +914,8 @@ _LIBZFS_H int libzfs_envvar_is_set(char *);
/*
* Utility functions for zfs version
*/
_LIBZFS_H void zfs_version_userland(char *, int);
_LIBZFS_H int zfs_version_kernel(char *, int);
_LIBZFS_H const char *zfs_version_userland(void);
_LIBZFS_H char *zfs_version_kernel(void);
_LIBZFS_H int zfs_version_print(void);
/*