lkml.org 
[lkml]   [2020]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 18/18] samples: add error state information to test-fsinfo.c [ver #21]
From
Date
From: Jeff Layton <jlayton@kernel.org>

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: David Howells <dhowells@redhat.com>
---

samples/vfs/test-fsinfo.c | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/samples/vfs/test-fsinfo.c b/samples/vfs/test-fsinfo.c
index 596fa5e71762..c359c3f52871 100644
--- a/samples/vfs/test-fsinfo.c
+++ b/samples/vfs/test-fsinfo.c
@@ -430,6 +430,15 @@ static void dump_afs_fsinfo_server_address(void *reply, unsigned int size)
printf("family=%u\n", ss->ss_family);
}

+static void dump_fsinfo_generic_error_state(void *reply, unsigned int size)
+{
+ struct fsinfo_error_state *es = reply;
+
+ printf("\n");
+ printf("\tlatest error : %d (%s)\n", es->wb_error_last, strerror(es->wb_error_last));
+ printf("\tcookie : 0x%x\n", es->wb_error_cookie);
+}
+
static void dump_string(void *reply, unsigned int size)
{
char *s = reply, *p;
@@ -518,6 +527,7 @@ static const struct fsinfo_attribute fsinfo_attributes[] = {
FSINFO_STRING (FSINFO_ATTR_AFS_CELL_NAME, string),
FSINFO_STRING (FSINFO_ATTR_AFS_SERVER_NAME, string),
FSINFO_LIST_N (FSINFO_ATTR_AFS_SERVER_ADDRESSES, afs_fsinfo_server_address),
+ FSINFO_VSTRUCT (FSINFO_ATTR_ERROR_STATE, fsinfo_generic_error_state),
{}
};


\
 
 \ /
  Last update: 2020-08-03 15:40    [W:0.234 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site