diff options
Diffstat (limited to 'libtrivfs')
-rw-r--r-- | libtrivfs/io-version.c | 10 | ||||
-rw-r--r-- | libtrivfs/trivfs.h | 7 |
2 files changed, 16 insertions, 1 deletions
diff --git a/libtrivfs/io-version.c b/libtrivfs/io-version.c index e656d5cc..59a0ebef 100644 --- a/libtrivfs/io-version.c +++ b/libtrivfs/io-version.c @@ -27,5 +27,13 @@ trivfs_S_io_server_version (trivfs_protid_t obj, int *min, int *edit) { - return EOPNOTSUPP; + if (!obj) + return EOPNOTSUPP; + + if (!&trivfs_server_name || !&trivfs_server_version) + return EOPNOTSUPP; + + snprintf (name, sizeof (string_t), "%s %s", + trivfs_server_name, trivfs_server_version); + return 0; } diff --git a/libtrivfs/trivfs.h b/libtrivfs/trivfs.h index c920b678..1295fe17 100644 --- a/libtrivfs/trivfs.h +++ b/libtrivfs/trivfs.h @@ -74,6 +74,13 @@ struct trivfs_control void *hook; /* for user use */ }; +/* The user may define this variable. Set this to the name of the + filesystem server. */ +extern char *trivfs_server_name __attribute__((weak)); + +/* The user may define this variables. Set this to be the server + version number. */ +extern char *trivfs_server_version __attribute__((weak)); /* The user must define these variables. */ extern int trivfs_fstype; |