Changes in uspace/srv/devman/match.c [9af1c61:39330200] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/devman/match.c
r9af1c61 r39330200 200 200 int fd; 201 201 size_t len = 0; 202 struct stat st;203 204 fd = vfs_lookup_open(conf_path, WALK_REGULAR, MODE_READ);205 if ( fd < 0) {202 vfs_stat_t st; 203 204 errno_t rc = vfs_lookup_open(conf_path, WALK_REGULAR, MODE_READ, &fd); 205 if (rc != EOK) { 206 206 log_msg(LOG_DEFAULT, LVL_ERROR, "Unable to open `%s' for reading: %s.", 207 conf_path, str_error( errno));207 conf_path, str_error(rc)); 208 208 goto cleanup; 209 209 } 210 210 opened = true; 211 211 212 if (vfs_stat(fd, &st) != EOK) { 212 rc = vfs_stat(fd, &st); 213 if (rc != EOK) { 213 214 log_msg(LOG_DEFAULT, LVL_ERROR, "Unable to fstat %d: %s.", fd, 214 str_error( errno));215 str_error(rc)); 215 216 goto cleanup; 216 217 } … … 230 231 231 232 size_t read_bytes; 232 intrc = vfs_read(fd, (aoff64_t []) {0}, buf, len, &read_bytes);233 rc = vfs_read(fd, (aoff64_t []) {0}, buf, len, &read_bytes); 233 234 if (rc != EOK) { 234 235 log_msg(LOG_DEFAULT, LVL_ERROR, "Unable to read file '%s': %s.", conf_path, 235 str_error( errno));236 str_error(rc)); 236 237 goto cleanup; 237 238 }
Note:
See TracChangeset
for help on using the changeset viewer.