Changeset 58898d1d in mainline for uspace/drv/bus/isa/isa.c
- Timestamp:
- 2017-03-24T20:31:54Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8e9b2534
- Parents:
- c9e3692
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/isa/isa.c
rc9e3692 r58898d1d 254 254 size_t len; 255 255 ssize_t r; 256 struct stat st; 256 257 257 258 fd = open(conf_path, O_RDONLY); … … 263 264 opened = true; 264 265 265 len = lseek(fd, 0, SEEK_END); 266 lseek(fd, 0, SEEK_SET); 266 if (fstat(fd, &st) != EOK) { 267 ddf_msg(LVL_ERROR, "Unable to fstat %d", fd); 268 goto cleanup; 269 } 270 271 len = st.size; 267 272 if (len == 0) { 268 273 ddf_msg(LVL_ERROR, "Configuration file '%s' is empty.", … … 277 282 } 278 283 279 r = read(fd, buf, len);284 r = read(fd, (aoff64_t []) {0}, buf, len); 280 285 if (r < 0) { 281 286 ddf_msg(LVL_ERROR, "Unable to read file '%s'.", conf_path);
Note:
See TracChangeset
for help on using the changeset viewer.