Lines Matching defs:req
48 static void cache_main(struct gctl_req *req, unsigned flags);
49 static void cache_clear(struct gctl_req *req);
50 static void cache_dump(struct gctl_req *req);
51 static void cache_label(struct gctl_req *req);
107 cache_main(struct gctl_req *req, unsigned flags)
114 name = gctl_get_ascii(req, "verb");
116 gctl_error(req, "No '%s' argument.", "verb");
120 cache_label(req);
122 cache_clear(req);
124 cache_dump(req);
126 gctl_error(req, "Unknown command: %s.", name);
130 cache_label(struct gctl_req *req)
138 nargs = gctl_get_int(req, "nargs");
140 gctl_error(req, "Invalid number of arguments.");
146 name = gctl_get_ascii(req, "arg0");
148 val = gctl_get_intmax(req, "blocksize");
150 val = gctl_get_intmax(req, "size");
153 name = gctl_get_ascii(req, "arg1");
158 gctl_error(req, "Not fully done.");
166 gctl_error(req, "Not fully done.");
174 cache_clear(struct gctl_req *req)
179 nargs = gctl_get_int(req, "nargs");
181 gctl_error(req, "Too few arguments.");
186 name = gctl_get_ascii(req, "arg%d", i);
191 gctl_error(req, "Not fully done.");
212 cache_dump(struct gctl_req *req)
218 nargs = gctl_get_int(req, "nargs");
220 gctl_error(req, "Too few arguments.");
225 name = gctl_get_ascii(req, "arg%d", i);
231 gctl_error(req, "Not fully done.");