5.0-pre2 release
[linux_from_scratch.git] / lfscmd / src / file.c
blobe9327c3bab38bb7d5049b4b96c9d047055ad42f5
1 /*
2 * Copyright (C) 2003 Timothy Bauscher <timothy@linuxfromscratch.org>
3 */
5 #include <stdio.h>
7 #include "string.h"
8 #include "file.h"
10 FILE *write_file (const char *fname, const char *mode) {
11 FILE *file = NULL;
13 if ((file = fopen(fname, mode)) == NULL)
14 error("Cannot access file: %s", fname);
16 return(file);