[TG3]: Set minimal hw interrupt mitigation.
[linux-2.6/verdex.git] / arch / um / kernel / initrd_user.c
blobcb90681e151cd510825dd8f7ca555ad8e0be137f
1 /*
2 * Copyright (C) 2000, 2001 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
4 */
6 #include <unistd.h>
7 #include <sys/types.h>
8 #include <sys/stat.h>
9 #include <errno.h>
11 #include "user_util.h"
12 #include "kern_util.h"
13 #include "user.h"
14 #include "initrd.h"
15 #include "os.h"
17 int load_initrd(char *filename, void *buf, int size)
19 int fd, n;
21 fd = os_open_file(filename, of_read(OPENFLAGS()), 0);
22 if(fd < 0){
23 printk("Opening '%s' failed - err = %d\n", filename, -fd);
24 return(-1);
26 n = os_read_file(fd, buf, size);
27 if(n != size){
28 printk("Read of %d bytes from '%s' failed, err = %d\n", size,
29 filename, -n);
30 return(-1);
33 os_close_file(fd);
34 return(0);
38 * Overrides for Emacs so that we follow Linus's tabbing style.
39 * Emacs will notice this stuff at the end of the file and automatically
40 * adjust the settings for this buffer only. This must remain at the end
41 * of the file.
42 * ---------------------------------------------------------------------------
43 * Local variables:
44 * c-file-style: "linux"
45 * End: