opts-visitor.h (7b1b5d191385ca52e96caae2a05c64f3a63855d9) | opts-visitor.h (1de7afc984b49af164e2619e6850b9732b173b34) |
---|---|
1/* 2 * Options Visitor 3 * 4 * Copyright Red Hat, Inc. 2012 5 * 6 * Author: Laszlo Ersek <lersek@redhat.com> 7 * 8 * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. 9 * See the COPYING.LIB file in the top-level directory. 10 * 11 */ 12 13#ifndef OPTS_VISITOR_H 14#define OPTS_VISITOR_H 15 16#include "qapi/visitor.h" | 1/* 2 * Options Visitor 3 * 4 * Copyright Red Hat, Inc. 2012 5 * 6 * Author: Laszlo Ersek <lersek@redhat.com> 7 * 8 * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. 9 * See the COPYING.LIB file in the top-level directory. 10 * 11 */ 12 13#ifndef OPTS_VISITOR_H 14#define OPTS_VISITOR_H 15 16#include "qapi/visitor.h" |
17#include "qemu-option.h" | 17#include "qemu/option.h" |
18 19typedef struct OptsVisitor OptsVisitor; 20 21/* Contrarily to qemu-option.c::parse_option_number(), OptsVisitor's "int" 22 * parser relies on strtoll() instead of strtoull(). Consequences: 23 * - string representations of negative numbers yield negative values, 24 * - values below INT64_MIN or LLONG_MIN are rejected, 25 * - values above INT64_MAX or LLONG_MAX are rejected. 26 */ 27OptsVisitor *opts_visitor_new(const QemuOpts *opts); 28void opts_visitor_cleanup(OptsVisitor *nv); 29Visitor *opts_get_visitor(OptsVisitor *nv); 30 31#endif | 18 19typedef struct OptsVisitor OptsVisitor; 20 21/* Contrarily to qemu-option.c::parse_option_number(), OptsVisitor's "int" 22 * parser relies on strtoll() instead of strtoull(). Consequences: 23 * - string representations of negative numbers yield negative values, 24 * - values below INT64_MIN or LLONG_MIN are rejected, 25 * - values above INT64_MAX or LLONG_MAX are rejected. 26 */ 27OptsVisitor *opts_visitor_new(const QemuOpts *opts); 28void opts_visitor_cleanup(OptsVisitor *nv); 29Visitor *opts_get_visitor(OptsVisitor *nv); 30 31#endif |