diff options
author | Bob Moore <robert.moore@intel.com> | 2014-07-07 22:08:13 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-07-08 08:22:27 -0400 |
commit | ff2389fe662460c71e4ee221cc223b175c231246 (patch) | |
tree | 44aa08ad98bc8f0989653b45fe6f086542a091d2 /tools/power | |
parent | c04691292ff75a3560279bcafb1be0848ae82c23 (diff) |
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/power')
-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 @@ | |||
1 | /****************************************************************************** | 1 | /****************************************************************************** |
2 | * | 2 | * |
3 | * Module Name: oslibcfs - C library OSL for file IO | 3 | * Module Name: oslibcfs - C library OSL for file I/O |
4 | * | 4 | * |
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
@@ -64,8 +64,8 @@ ACPI_MODULE_NAME("oslibcfs") | |||
64 | ACPI_FILE acpi_os_open_file(const char *path, u8 modes) | 64 | ACPI_FILE acpi_os_open_file(const char *path, u8 modes) |
65 | { | 65 | { |
66 | ACPI_FILE file; | 66 | ACPI_FILE file; |
67 | char modes_str[4]; | ||
68 | u32 i = 0; | 67 | u32 i = 0; |
68 | char modes_str[4]; | ||
69 | 69 | ||
70 | if (modes & ACPI_FILE_READING) { | 70 | if (modes & ACPI_FILE_READING) { |
71 | modes_str[i++] = 'r'; | 71 | modes_str[i++] = 'r'; |
@@ -76,6 +76,7 @@ ACPI_FILE acpi_os_open_file(const char *path, u8 modes) | |||
76 | if (modes & ACPI_FILE_BINARY) { | 76 | if (modes & ACPI_FILE_BINARY) { |
77 | modes_str[i++] = 'b'; | 77 | modes_str[i++] = 'b'; |
78 | } | 78 | } |
79 | |||
79 | modes_str[i++] = '\0'; | 80 | modes_str[i++] = '\0'; |
80 | 81 | ||
81 | file = fopen(path, modes_str); | 82 | file = fopen(path, modes_str); |
@@ -90,11 +91,11 @@ ACPI_FILE acpi_os_open_file(const char *path, u8 modes) | |||
90 | * | 91 | * |
91 | * FUNCTION: acpi_os_close_file | 92 | * FUNCTION: acpi_os_close_file |
92 | * | 93 | * |
93 | * PARAMETERS: file - File descriptor | 94 | * PARAMETERS: file - An open file descriptor |
94 | * | 95 | * |
95 | * RETURN: None. | 96 | * RETURN: None. |
96 | * | 97 | * |
97 | * DESCRIPTION: Close a file. | 98 | * DESCRIPTION: Close a file opened via acpi_os_open_file. |
98 | * | 99 | * |
99 | ******************************************************************************/ | 100 | ******************************************************************************/ |
100 | 101 | ||
@@ -107,14 +108,14 @@ void acpi_os_close_file(ACPI_FILE file) | |||
107 | * | 108 | * |
108 | * FUNCTION: acpi_os_read_file | 109 | * FUNCTION: acpi_os_read_file |
109 | * | 110 | * |
110 | * PARAMETERS: file - File descriptor | 111 | * PARAMETERS: file - An open file descriptor |
111 | * buffer - Data buffer | 112 | * buffer - Data buffer |
112 | * size - Data block size | 113 | * size - Data block size |
113 | * count - Number of data blocks | 114 | * count - Number of data blocks |
114 | * | 115 | * |
115 | * RETURN: Size of successfully read buffer. | 116 | * RETURN: Number of bytes actually read. |
116 | * | 117 | * |
117 | * DESCRIPTION: Read a file. | 118 | * DESCRIPTION: Read from a file. |
118 | * | 119 | * |
119 | ******************************************************************************/ | 120 | ******************************************************************************/ |
120 | 121 | ||
@@ -135,14 +136,14 @@ acpi_os_read_file(ACPI_FILE file, void *buffer, acpi_size size, acpi_size count) | |||
135 | * | 136 | * |
136 | * FUNCTION: acpi_os_write_file | 137 | * FUNCTION: acpi_os_write_file |
137 | * | 138 | * |
138 | * PARAMETERS: file - File descriptor | 139 | * PARAMETERS: file - An open file descriptor |
139 | * buffer - Data buffer | 140 | * buffer - Data buffer |
140 | * size - Data block size | 141 | * size - Data block size |
141 | * count - Number of data blocks | 142 | * count - Number of data blocks |
142 | * | 143 | * |
143 | * RETURN: Size of successfully written buffer. | 144 | * RETURN: Number of bytes actually written. |
144 | * | 145 | * |
145 | * DESCRIPTION: Write a file. | 146 | * DESCRIPTION: Write to a file. |
146 | * | 147 | * |
147 | ******************************************************************************/ | 148 | ******************************************************************************/ |
148 | 149 | ||
@@ -164,9 +165,9 @@ acpi_os_write_file(ACPI_FILE file, | |||
164 | * | 165 | * |
165 | * FUNCTION: acpi_os_get_file_offset | 166 | * FUNCTION: acpi_os_get_file_offset |
166 | * | 167 | * |
167 | * PARAMETERS: file - File descriptor | 168 | * PARAMETERS: file - An open file descriptor |
168 | * | 169 | * |
169 | * RETURN: Size of current position. | 170 | * RETURN: Current file pointer position. |
170 | * | 171 | * |
171 | * DESCRIPTION: Get current file offset. | 172 | * DESCRIPTION: Get current file offset. |
172 | * | 173 | * |
@@ -177,7 +178,6 @@ long acpi_os_get_file_offset(ACPI_FILE file) | |||
177 | long offset; | 178 | long offset; |
178 | 179 | ||
179 | offset = ftell(file); | 180 | offset = ftell(file); |
180 | |||
181 | return (offset); | 181 | return (offset); |
182 | } | 182 | } |
183 | 183 | ||
@@ -185,8 +185,8 @@ long acpi_os_get_file_offset(ACPI_FILE file) | |||
185 | * | 185 | * |
186 | * FUNCTION: acpi_os_set_file_offset | 186 | * FUNCTION: acpi_os_set_file_offset |
187 | * | 187 | * |
188 | * PARAMETERS: file - File descriptor | 188 | * PARAMETERS: file - An open file descriptor |
189 | * offset - File offset | 189 | * offset - New file offset |
190 | * from - From begin/end of file | 190 | * from - From begin/end of file |
191 | * | 191 | * |
192 | * RETURN: Status | 192 | * RETURN: Status |