diff options
| author | Harshavardhana <harsha@harshavardhana.net> | 2014-05-03 13:25:41 -0700 | 
|---|---|---|
| committer | Anand Avati <avati@redhat.com> | 2014-05-05 17:29:59 -0700 | 
| commit | a05c579f1c3695c4ddead0a5cfc2c92422bd4f8f (patch) | |
| tree | 769ad843f263d354bcf6ed544093ac562cc8b2f4 /xlators/meta/src/version-file.c | |
| parent | f01626d5bad8eb0298897e90a124301008cdd0da (diff) | |
meta: print in json for stack/frames, cmdline and version
- Follow formatting rules based on RFC4627 -
  http://www.ietf.org/rfc/rfc4627.txt
- Add checks for json in regression test meta.t
Change-Id: I480d32ce042b202d3ed8939623c629a03b458551
BUG: 1089216
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/7653
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/meta/src/version-file.c')
| -rw-r--r-- | xlators/meta/src/version-file.c | 13 | 
1 files changed, 7 insertions, 6 deletions
diff --git a/xlators/meta/src/version-file.c b/xlators/meta/src/version-file.c index 77f2dea3d66..c402453ee96 100644 --- a/xlators/meta/src/version-file.c +++ b/xlators/meta/src/version-file.c @@ -26,21 +26,22 @@  static int  version_file_fill (xlator_t *this, inode_t *file, strfd_t *strfd)  { -	strprintf (strfd, "%s\n", PACKAGE_VERSION); -	return strfd->size; +        strprintf (strfd, "{ \n  \"Package Version\": \"%s\"\n}", +                   PACKAGE_VERSION); +        return strfd->size;  }  static struct meta_ops version_file_ops = { -	.file_fill = version_file_fill, +        .file_fill = version_file_fill,  };  int  meta_version_file_hook (call_frame_t *frame, xlator_t *this, loc_t *loc, -			dict_t *xdata) +                        dict_t *xdata)  { -	meta_ops_set (loc->inode, this, &version_file_ops); +        meta_ops_set (loc->inode, this, &version_file_ops); -	return 0; +        return 0;  }  | 
