Lines Matching refs:req
50 static void cache_main(struct gctl_req *req, unsigned flags);
51 static void cache_clear(struct gctl_req *req);
52 static void cache_dump(struct gctl_req *req);
53 static void cache_label(struct gctl_req *req);
109 cache_main(struct gctl_req *req, unsigned flags)
116 name = gctl_get_ascii(req, "verb");
118 gctl_error(req, "No '%s' argument.", "verb");
122 cache_label(req);
124 cache_clear(req);
126 cache_dump(req);
128 gctl_error(req, "Unknown command: %s.", name);
132 cache_label(struct gctl_req *req)
141 nargs = gctl_get_int(req, "nargs");
143 gctl_error(req, "Invalid number of arguments.");
149 name = gctl_get_ascii(req, "arg0");
151 val = gctl_get_intmax(req, "blocksize");
153 val = gctl_get_intmax(req, "size");
156 name = gctl_get_ascii(req, "arg1");
161 gctl_error(req, "Not fully done.");
169 gctl_error(req, "Not fully done.");
177 cache_clear(struct gctl_req *req)
182 nargs = gctl_get_int(req, "nargs");
184 gctl_error(req, "Too few arguments.");
189 name = gctl_get_ascii(req, "arg%d", i);
194 gctl_error(req, "Not fully done.");
215 cache_dump(struct gctl_req *req)
221 nargs = gctl_get_int(req, "nargs");
223 gctl_error(req, "Too few arguments.");
228 name = gctl_get_ascii(req, "arg%d", i);
234 gctl_error(req, "Not fully done.");