oslibcfs.c (278970) | oslibcfs.c (298714) |
---|---|
1/****************************************************************************** 2 * 3 * Module Name: oslibcfs - C library OSL for file I/O 4 * 5 *****************************************************************************/ 6 7/* | 1/****************************************************************************** 2 * 3 * Module Name: oslibcfs - C library OSL for file I/O 4 * 5 *****************************************************************************/ 6 7/* |
8 * Copyright (C) 2000 - 2015, Intel Corp. | 8 * Copyright (C) 2000 - 2016, Intel Corp. |
9 * All rights reserved. 10 * 11 * Redistribution and use in source and binary forms, with or without 12 * modification, are permitted provided that the following conditions 13 * are met: 14 * 1. Redistributions of source code must retain the above copyright 15 * notice, this list of conditions, and the following disclaimer, 16 * without modification. --- 59 unchanged lines hidden (view full) --- 76 if (Modes & ACPI_FILE_READING) 77 { 78 ModesStr[i++] = 'r'; 79 } 80 if (Modes & ACPI_FILE_WRITING) 81 { 82 ModesStr[i++] = 'w'; 83 } | 9 * All rights reserved. 10 * 11 * Redistribution and use in source and binary forms, with or without 12 * modification, are permitted provided that the following conditions 13 * are met: 14 * 1. Redistributions of source code must retain the above copyright 15 * notice, this list of conditions, and the following disclaimer, 16 * without modification. --- 59 unchanged lines hidden (view full) --- 76 if (Modes & ACPI_FILE_READING) 77 { 78 ModesStr[i++] = 'r'; 79 } 80 if (Modes & ACPI_FILE_WRITING) 81 { 82 ModesStr[i++] = 'w'; 83 } |
84 |
|
84 if (Modes & ACPI_FILE_BINARY) 85 { 86 ModesStr[i++] = 'b'; 87 } 88 89 ModesStr[i++] = '\0'; 90 91 File = fopen (Path, ModesStr); --- 17 unchanged lines hidden (view full) --- 109 * DESCRIPTION: Close a file opened via AcpiOsOpenFile. 110 * 111 ******************************************************************************/ 112 113void 114AcpiOsCloseFile ( 115 ACPI_FILE File) 116{ | 85 if (Modes & ACPI_FILE_BINARY) 86 { 87 ModesStr[i++] = 'b'; 88 } 89 90 ModesStr[i++] = '\0'; 91 92 File = fopen (Path, ModesStr); --- 17 unchanged lines hidden (view full) --- 110 * DESCRIPTION: Close a file opened via AcpiOsOpenFile. 111 * 112 ******************************************************************************/ 113 114void 115AcpiOsCloseFile ( 116 ACPI_FILE File) 117{ |
118 |
|
117 fclose (File); 118} 119 120 121/******************************************************************************* 122 * 123 * FUNCTION: AcpiOsReadFile 124 * --- 109 unchanged lines hidden (view full) --- 234{ 235 int Ret = 0; 236 237 238 if (From == ACPI_FILE_BEGIN) 239 { 240 Ret = fseek (File, Offset, SEEK_SET); 241 } | 119 fclose (File); 120} 121 122 123/******************************************************************************* 124 * 125 * FUNCTION: AcpiOsReadFile 126 * --- 109 unchanged lines hidden (view full) --- 236{ 237 int Ret = 0; 238 239 240 if (From == ACPI_FILE_BEGIN) 241 { 242 Ret = fseek (File, Offset, SEEK_SET); 243 } |
244 |
|
242 if (From == ACPI_FILE_END) 243 { 244 Ret = fseek (File, Offset, SEEK_END); 245 } 246 247 if (Ret < 0) 248 { 249 return (AE_ERROR); 250 } 251 else 252 { 253 return (AE_OK); 254 } 255} | 245 if (From == ACPI_FILE_END) 246 { 247 Ret = fseek (File, Offset, SEEK_END); 248 } 249 250 if (Ret < 0) 251 { 252 return (AE_ERROR); 253 } 254 else 255 { 256 return (AE_OK); 257 } 258} |