return (x); \
}while(0)
+/* Some versions of flex have a bug (Fedora bugzilla 612465) which causes
+ * it to fail to declare these functions, which it defines. So declare
+ * them ourselves. Hopefully we won't have to simultaneously support
+ * a flex version which declares these differently somehow. */
+int xlu__cfg_yyget_column(yyscan_t yyscanner);
+void xlu__cfg_yyset_column(int column_no, yyscan_t yyscanner);
-#line 493 "libxlu_cfg_l.c"
+
+#line 500 "libxlu_cfg_l.c"
#define INITIAL 0
#define lexerr 1
register int yy_act;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-#line 30 "libxlu_cfg_l.l"
+#line 37 "libxlu_cfg_l.l"
-#line 741 "libxlu_cfg_l.c"
+#line 748 "libxlu_cfg_l.c"
yylval = yylval_param;
case 1:
YY_RULE_SETUP
-#line 32 "libxlu_cfg_l.l"
+#line 39 "libxlu_cfg_l.l"
{
yylval->string= xlu__cfgl_strdup(ctx,yytext);
GOT(IDENT);
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 36 "libxlu_cfg_l.l"
+#line 43 "libxlu_cfg_l.l"
{
yylval->string= xlu__cfgl_strdup(ctx,yytext);
GOT(NUMBER);
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 41 "libxlu_cfg_l.l"
+#line 48 "libxlu_cfg_l.l"
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 43 "libxlu_cfg_l.l"
+#line 50 "libxlu_cfg_l.l"
{ GOT(','); }
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 44 "libxlu_cfg_l.l"
+#line 51 "libxlu_cfg_l.l"
{ GOT('['); }
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 45 "libxlu_cfg_l.l"
+#line 52 "libxlu_cfg_l.l"
{ GOT(']'); }
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 46 "libxlu_cfg_l.l"
+#line 53 "libxlu_cfg_l.l"
{ GOT('='); }
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 47 "libxlu_cfg_l.l"
+#line 54 "libxlu_cfg_l.l"
{ GOT(';'); }
YY_BREAK
case 9:
/* rule 9 can match eol */
YY_RULE_SETUP
-#line 49 "libxlu_cfg_l.l"
+#line 56 "libxlu_cfg_l.l"
{ yylloc->first_line= yylineno-1; return NEWLINE; }
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 51 "libxlu_cfg_l.l"
+#line 58 "libxlu_cfg_l.l"
{
yylval->string= xlu__cfgl_dequote(ctx,yytext);
GOT(STRING);
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 55 "libxlu_cfg_l.l"
+#line 62 "libxlu_cfg_l.l"
{
yylval->string= xlu__cfgl_dequote(ctx,yytext);
GOT(STRING);
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 60 "libxlu_cfg_l.l"
+#line 67 "libxlu_cfg_l.l"
{
BEGIN(lexerr);
yymore();
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 65 "libxlu_cfg_l.l"
+#line 72 "libxlu_cfg_l.l"
{
xlu__cfgl_lexicalerror(ctx,"lexical error");
BEGIN(0);
case 14:
/* rule 14 can match eol */
YY_RULE_SETUP
-#line 70 "libxlu_cfg_l.l"
+#line 77 "libxlu_cfg_l.l"
{
xlu__cfgl_lexicalerror(ctx,"lexical error");
BEGIN(0);
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 75 "libxlu_cfg_l.l"
+#line 82 "libxlu_cfg_l.l"
YY_FATAL_ERROR( "flex scanner jammed" );
YY_BREAK
-#line 941 "libxlu_cfg_l.c"
+#line 948 "libxlu_cfg_l.c"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(lexerr):
yyterminate();
#define YYTABLES_NAME "yytables"
-#line 75 "libxlu_cfg_l.l"
+#line 82 "libxlu_cfg_l.l"
#define LOG(_f, _a...) dolog(__FILE__, __LINE__, __func__, _f "\n", ##_a)
-void dolog(const char *file, int line, const char *func, char *fmt, ...)
+static void dolog(const char *file, int line, const char *func, char *fmt, ...)
{
va_list ap;
char *s;
return r;
}
-int autoconnect_console(int hvm)
+static int autoconnect_console(int hvm)
{
int status, options;
pid_t pid, r;
return kbytes;
}
-int set_memory_max(char *p, char *mem)
+static int set_memory_max(char *p, char *mem)
{
int64_t memorykb;
int rc;
return 0;
}
-void set_memory_target(char *p, char *mem)
+static void set_memory_target(char *p, char *mem)
{
long long int memorykb;
return 0;
}
-void cd_insert(char *dom, char *virtdev, char *phys)
+static void cd_insert(char *dom, char *virtdev, char *phys)
{
libxl_device_disk disk;
char *p;
return 0;
}
-void pcilist_assignable(void)
+static void pcilist_assignable(void)
{
libxl_device_pci *pcidevs;
int num, i;
return 0;
}
-void pcilist(char *dom)
+static void pcilist(char *dom)
{
libxl_device_pci *pcidevs;
int num, i;
return 0;
}
-void pcidetach(char *dom, char *bdf)
+static void pcidetach(char *dom, char *bdf)
{
libxl_device_pci pcidev;
pcidetach(domname, bdf);
return 0;
}
-void pciattach(char *dom, char *bdf, char *vs)
+static void pciattach(char *dom, char *bdf, char *vs)
{
libxl_device_pci pcidev;
return 0;
}
-void pause_domain(char *p)
+static void pause_domain(char *p)
{
find_domain(p);
libxl_domain_pause(&ctx, domid);
}
-void unpause_domain(char *p)
+static void unpause_domain(char *p)
{
find_domain(p);
libxl_domain_unpause(&ctx, domid);
}
-void destroy_domain(char *p)
+static void destroy_domain(char *p)
{
int rc;
find_domain(p);
if (rc) { fprintf(stderr,"destroy failed (rc=%d)\n.",rc); exit(-1); }
}
-void shutdown_domain(char *p)
+static void shutdown_domain(char *p)
{
int rc;
find_domain(p);
if (rc) { fprintf(stderr,"shutdown failed (rc=%d)\n.",rc);exit(-1); }
}
-void reboot_domain(char *p)
+static void reboot_domain(char *p)
{
int rc;
find_domain(p);
if (rc) { fprintf(stderr,"reboot failed (rc=%d)\n.",rc);exit(-1); }
}
-void list_domains_details(const libxl_dominfo *info, int nb_domain)
+static void list_domains_details(const libxl_dominfo *info, int nb_domain)
{
struct domain_config d_config;
}
}
-void list_domains(int verbose, const libxl_dominfo *info, int nb_domain)
+static void list_domains(int verbose, const libxl_dominfo *info, int nb_domain)
{
int i;
}
}
-void list_vm(void)
+static void list_vm(void)
{
libxl_vminfo *info;
char *domname;
}
}
-void save_domain_core_writeconfig(int fd, const char *filename,
+static void save_domain_core_writeconfig(int fd, const char *filename,
const uint8_t *config_data, int config_len)
{
struct save_file_header hdr;
hdr.optional_data_len);
}
-int save_domain(char *p, char *filename, int checkpoint,
+static int save_domain(char *p, char *filename, int checkpoint,
const char *override_config_file)
{
int fd;
return 0;
}
-void button_press(char *p, char *b)
+static void button_press(char *p, char *b)
{
libxl_button button;
}
}
-void vcpulist(int argc, char **argv)
+static void vcpulist(int argc, char **argv)
{
libxl_dominfo *dominfo, *domlist;
libxl_vcpuinfo *vcpuinfo, *list = NULL;
return 0;
}
-void vcpupin(char *d, const char *vcpu, char *cpu)
+static void vcpupin(char *d, const char *vcpu, char *cpu)
{
libxl_vcpuinfo *vcpuinfo;
libxl_physinfo physinfo;
return 0;
}
-void vcpuset(char *d, char* nr_vcpus)
+static void vcpuset(char *d, char* nr_vcpus)
{
char *endptr;
unsigned int max_vcpus;