Re: [GSOC 2014][PATCH 3/4] JSON: Add basic support for syscalls in io.c

2014-07-08 Thread yangmin zhu
Hi Dmitry, > > In this example, since va_list processing is easier and more efficient > than string parsing, I'd recommend > json_printf(JSON_ARG, JSON_SEP, 0L); > instead of > json_printf("arg sepa"); > > Also, when a function name ends with "printf", it is expected to take a > pr

Re: [GSOC 2014][PATCH 3/4] JSON: Add basic support for syscalls in io.c

2014-06-30 Thread Dmitry V. Levin
Hi YangMin, On Sun, Jun 29, 2014 at 09:23:12PM +0800, yangmin zhu wrote: [...] > 1) I had ever thought about to hide all JSON related details from > syscall parsers, such as to use functions like > print_arg_fd(tcp->u_arg[0]); > and I even implemented a simple framework for that. But I changed not

Re: [GSOC 2014][PATCH 3/4] JSON: Add basic support for syscalls in io.c

2014-06-29 Thread yangmin zhu
Hi Dmitry, Thank you for your review. On Fri, Jun 27, 2014 at 10:02 AM, Dmitry V. Levin wrote: > Hi YangMin, > > Thanks for these examples. Let's have a look at the first one: > >> int >> sys_read(struct tcb *tcp) >> { >> JSON_BEGIN_META_MODE; >> >> if (entering(tcp)) { >>

Re: [GSOC 2014][PATCH 3/4] JSON: Add basic support for syscalls in io.c

2014-06-26 Thread Dmitry V. Levin
Hi YangMin, On Thu, Jun 19, 2014 at 12:29:49AM +0800, Zhu YangMin wrote: > The basic means that all the arguments are simply wrapped in > a string value even for those complicated arguments printed by > specific functions such as printflags(). We need to do more work > to change those functions to

[GSOC 2014][PATCH 3/4] JSON: Add basic support for syscalls in io.c

2014-06-18 Thread Zhu YangMin
The basic means that all the arguments are simply wrapped in a string value even for those complicated arguments printed by specific functions such as printflags(). We need to do more work to change those functions to be more like JSON-style. * io.c(sys_read, sys_write, sys_readv, sys_writev, sys_