summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bios_extract.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/bios_extract.c b/bios_extract.c
index 4075b96..0bd4dd9 100644
--- a/bios_extract.c
+++ b/bios_extract.c
@@ -42,8 +42,15 @@ unsigned char *
42MMapOutputFile(char *filename, int size) 42MMapOutputFile(char *filename, int size)
43{ 43{
44 unsigned char* Buffer; 44 unsigned char* Buffer;
45 char *tmp;
45 int fd; 46 int fd;
46 47
48 /* all slash signs '/' in filenames will be replaced by a
49 backslash sign '\' */
50 tmp = filename;
51 while ((tmp = strchr(tmp, '/')) != NULL)
52 tmp[0] = '\\';
53
47 fd = open(filename, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR); 54 fd = open(filename, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
48 if (fd < 0) { 55 if (fd < 0) {
49 fprintf(stderr, "Error: unable to open %s: %s\n\n", 56 fprintf(stderr, "Error: unable to open %s: %s\n\n",
@@ -110,7 +117,7 @@ main(int argc, char *argv[])
110 int i, len; 117 int i, len;
111 unsigned char *tmp; 118 unsigned char *tmp;
112 119
113 if ((argc != 2) || !strcmp(argv[1], "-h") || !strcmp(argv[1], "--help")){ 120 if ((argc != 2) || !strcmp(argv[1], "-h") || !strcmp(argv[1], "--help")){
114 HelpPrint(argv[0]); 121 HelpPrint(argv[0]);
115 return 1; 122 return 1;
116 } 123 }