soc/intel/xeon_sp: Drop uncore_fill_ssdt
[coreboot2.git] / util / nvramtool / reg_expr.c
bloba3b1aa8a7bc32887bc3f6abaf9c2d612c51b4630
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <stdarg.h>
4 #include "common.h"
5 #include "reg_expr.h"
7 /****************************************************************************
8 * compile_reg_expr
10 * Compile a regular expression.
11 ****************************************************************************/
12 void compile_reg_expr(int cflags, const char *expr, regex_t *reg)
14 static const size_t ERROR_BUF_SIZE = 256;
15 char error_msg[ERROR_BUF_SIZE];
16 int result;
18 if ((result = regcomp(reg, expr, cflags)) != 0) {
19 regerror(result, reg, error_msg, ERROR_BUF_SIZE);
20 fprintf(stderr, "%s: %s\n", prog_name, error_msg);
21 exit(1);