aboutsummaryrefslogtreecommitdiffstats
path: root/config_parser.h
blob: b1adb7f76f7594551b3a5c4cd15bcae77d9b6237 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
 * config_parser.h
 *
 * Configuration file-related definitions for user space suspend and resume
 * tools.
 *
 * Copyright (C) 2006 Rafael J. Wysocki <rjw@sisk.pl>
 *
 * This file is released under the GPLv2.
 *
 */

#include <getopt.h>

#define MAX_STR_LEN	256

struct config_par {
	char *name;	/* NULL on last record */
	char *fmt;
	void *ptr;
	unsigned int len;
};

int parse_line(char *str, struct config_par *parv);
int parse(char *my_name, char *file_name, struct config_par *parv);

void usage(char *my_name, struct option options[], const char *short_options);
void version(char *my_name, char *extra_version);

#define CONFIG_FILE	"/etc/suspend.conf"