File: config_parser.h

package info (click to toggle)
uswsusp 1.0+20120915-6.2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,572 kB
  • sloc: ansic: 7,164; sh: 566; makefile: 223; perl: 65
file content (30 lines) | stat: -rw-r--r-- 664 bytes parent folder | download | duplicates (4)
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/uswsusp.conf"