search for: pr_args

Displaying 11 results from an estimated 11 matches for "pr_args".

Did you mean: nr_args
2017 Apr 20
6
[PATCH 0/5] generator: daemon: Various simplifications to stubs code.
This is a series of simplifications to the stubs code. It's all refactoring, there is no functional change. Rich.
2009 Aug 12
1
factorization would be nice
Hi Rich, I've changed part of generator.ml to look like this: (match snd style with | [] -> () | args -> pr " memset (&args, 0, sizeof args);\n"; pr "\n"; pr " if (!xdr_guestfs_%s_args (xdr_in, &args)) {\n" name; pr " reply_with_error (\"%%s: daemon failed to decode
2013 Jan 24
3
[REVIEW ONLY] Mountable patches
These 3 patches implement support for APIs which must accept a mountable, but don't update apis which must return mountables. Matt
2009 Aug 17
13
total warning-removal for daemon/
The warnings in daemon were aggravating and risky for development (too easy to miss new ones) so I spent some time last week and today working on removing them. The first patch gets us down to almost no warnings with the original -Wall setting. That was by far the hardest part. Once I'd done that, I enabled nearly all of gcc's warnings via gnulib's warnings and manywarnings modules
2013 Feb 07
12
[PATCH 01/12] generator: Add new Mountable argument type
...guestfs_%s_args args;\n" name; List.iter ( function - | Device n | Dev_or_Path n + | Device n | Mountable n | Dev_or_Path n | Pathname n | String n | Key n @@ -205,7 +205,7 @@ and generate_daemon_actions () = pr_args n; pr " ABS_PATH (%s, %s, goto done);\n" n (if is_filein then "cancel_receive ()" else ""); - | Device n -> + | Device n | Mountable n -> pr_args n; pr " RESOLVE_DEVICE (%s, %s...
2014 Feb 10
5
[PATCH 0/4] add GUID validation (RHBZ#1008417)
Hi, this patch serie adds a new GUID type in the generator, which would do the same as String, but also validating (just in the C output) the passed GUID string. This allows to reject invalid GUIDs before passing them to low-level tools. Pino Toscano (4): utils: add a function to validate a GUID string generator: add a GUID parameter type generator: generate code for parameter validation
2009 Aug 12
23
[PATCH 0/23] factor and const-correctness
This started as a simple warning-elimination change. I'll get back to that series shortly ;-) It turned into a factorization and constification exercise during which I got a taste of ocaml. Thanks to Rich Jones for help with a few snippets in generator.ml. The overall result is that many previously-manually-maintained bits from daemon/*.c functions are now hoisted into the automatically-
2015 Oct 20
3
[PATCH 1/2] generator: add a RelativePathnameList parameter type
...DeviceList n -> pr " CLEANUP_FREE_STRING_LIST char **%s = NULL;\n" n @@ -344,7 +344,23 @@ cleanup_free_mountable (mountable_t *mountable) n n (if is_filein then "cancel_receive ()" else ""); | String n | Key n | GUID n -> pr_args n | OptString n -> pr " %s = args.%s ? *args.%s : NULL;\n" n n n - | StringList n -> + | StringList n | RelativePathnameList n as arg -> + (match arg with + | RelativePathnameList n -> + pr " {\n"; +...
2015 Oct 21
2
[PATCH 1/2] generator: add a FilenameList parameter type
...DeviceList n -> pr " CLEANUP_FREE_STRING_LIST char **%s = NULL;\n" n @@ -344,7 +344,23 @@ cleanup_free_mountable (mountable_t *mountable) n n (if is_filein then "cancel_receive ()" else ""); | String n | Key n | GUID n -> pr_args n | OptString n -> pr " %s = args.%s ? *args.%s : NULL;\n" n n n - | StringList n -> + | StringList n | FilenameList n as arg -> + (match arg with + | FilenameList n -> + pr " {\n"; + pr &...
2017 Apr 21
0
[PATCH 1/2] generator: Simplify the handling of string parameters.
...(* Reject Optional functions that are not available (RHBZ#679737). *) (match optional with @@ -246,24 +250,24 @@ let generate_daemon_stubs actions () = in List.iter ( function - | Pathname n -> + | String (Pathname, n) -> pr_args n; pr " ABS_PATH (%s, %b, return);\n" n is_filein; - | Device n -> + | String (Device, n) -> pr " RESOLVE_DEVICE (args.%s, %s, %b);\n" n n is_filein; - | Mountable n -> + | String (Mountable, n) ->...
2017 Apr 21
4
[PATCH 0/2] generator: Simplify the handling of string parameters.
Very large but mechanical change to the generator. Rich.