diff options
author | Bob Moore <robert.moore@intel.com> | 2014-07-08 10:08:13 +0800 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-07-08 14:22:27 +0200 |
commit | ff2389fe662460c71e4ee221cc223b175c231246 (patch) | |
tree | 44aa08ad98bc8f0989653b45fe6f086542a091d2 /tools | |
parent | c04691292ff75a3560279bcafb1be0848ae82c23 (diff) | |
download | linux-ff2389fe662460c71e4ee221cc223b175c231246.tar.gz linux-ff2389fe662460c71e4ee221cc223b175c231246.tar.bz2 linux-ff2389fe662460c71e4ee221cc223b175c231246.zip |
ACPICA: utprint/oslibcfs: cleanup - no functional change
Some cleanup and comment update.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/power/acpi/os_specific/service_layers/oslibcfs.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/tools/power/acpi/os_specific/service_layers/oslibcfs.c b/tools/power/acpi/os_specific/service_layers/oslibcfs.c index 2da0ce885c8c..c13ff9c51d74 100644 --- a/tools/power/acpi/os_specific/service_layers/oslibcfs.c +++ b/tools/power/acpi/os_specific/service_layers/oslibcfs.c @@ -1,6 +1,6 @@ /****************************************************************************** * - * Module Name: oslibcfs - C library OSL for file IO + * Module Name: oslibcfs - C library OSL for file I/O * *****************************************************************************/ @@ -64,8 +64,8 @@ ACPI_MODULE_NAME("oslibcfs") ACPI_FILE acpi_os_open_file(const char *path, u8 modes) { ACPI_FILE file; - char modes_str[4]; u32 i = 0; + char modes_str[4]; if (modes & ACPI_FILE_READING) { modes_str[i++] = 'r'; @@ -76,6 +76,7 @@ ACPI_FILE acpi_os_open_file(const char *path, u8 modes) if (modes & ACPI_FILE_BINARY) { modes_str[i++] = 'b'; } + modes_str[i++] = '\0'; file = fopen(path, modes_str); @@ -90,11 +91,11 @@ ACPI_FILE acpi_os_open_file(const char *path, u8 modes) * * FUNCTION: acpi_os_close_file * - * PARAMETERS: file - File descriptor + * PARAMETERS: file - An open file descriptor * * RETURN: None. * - * DESCRIPTION: Close a file. + * DESCRIPTION: Close a file opened via acpi_os_open_file. * ******************************************************************************/ @@ -107,14 +108,14 @@ void acpi_os_close_file(ACPI_FILE file) * * FUNCTION: acpi_os_read_file * - * PARAMETERS: file - File descriptor + * PARAMETERS: file - An open file descriptor * buffer - Data buffer * size - Data block size * count - Number of data blocks * - * RETURN: Size of successfully read buffer. + * RETURN: Number of bytes actually read. * - * DESCRIPTION: Read a file. + * DESCRIPTION: Read from a file. * ******************************************************************************/ @@ -135,14 +136,14 @@ acpi_os_read_file(ACPI_FILE file, void *buffer, acpi_size size, acpi_size count) * * FUNCTION: acpi_os_write_file * - * PARAMETERS: file - File descriptor + * PARAMETERS: file - An open file descriptor * buffer - Data buffer * size - Data block size * count - Number of data blocks * - * RETURN: Size of successfully written buffer. + * RETURN: Number of bytes actually written. * - * DESCRIPTION: Write a file. + * DESCRIPTION: Write to a file. * ******************************************************************************/ @@ -164,9 +165,9 @@ acpi_os_write_file(ACPI_FILE file, * * FUNCTION: acpi_os_get_file_offset * - * PARAMETERS: file - File descriptor + * PARAMETERS: file - An open file descriptor * - * RETURN: Size of current position. + * RETURN: Current file pointer position. * * DESCRIPTION: Get current file offset. * @@ -177,7 +178,6 @@ long acpi_os_get_file_offset(ACPI_FILE file) long offset; offset = ftell(file); - return (offset); } @@ -185,8 +185,8 @@ long acpi_os_get_file_offset(ACPI_FILE file) * * FUNCTION: acpi_os_set_file_offset * - * PARAMETERS: file - File descriptor - * offset - File offset + * PARAMETERS: file - An open file descriptor + * offset - New file offset * from - From begin/end of file * * RETURN: Status |