sizeof on coffee_fd_set is no longer suitable since it has become a
pointer.
This commit is contained in:
parent
f1fc4c879f
commit
98f7f9a06a
1 changed files with 14 additions and 10 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2008, Swedish Institute of Computer Science
|
* Copyright (c) 2008, 2009, Swedish Institute of Computer Science
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
@ -96,8 +96,10 @@
|
||||||
!HDR_OBSOLETE(hdr) && \
|
!HDR_OBSOLETE(hdr) && \
|
||||||
!HDR_ISOLATED(hdr))
|
!HDR_ISOLATED(hdr))
|
||||||
|
|
||||||
#define COFFEE_PAGE_COUNT ((coffee_page_t)(COFFEE_SIZE / COFFEE_PAGE_SIZE))
|
#define COFFEE_PAGE_COUNT \
|
||||||
#define COFFEE_PAGES_PER_SECTOR ((coffee_page_t)(COFFEE_SECTOR_SIZE / COFFEE_PAGE_SIZE))
|
((coffee_page_t)(COFFEE_SIZE / COFFEE_PAGE_SIZE))
|
||||||
|
#define COFFEE_PAGES_PER_SECTOR \
|
||||||
|
((coffee_page_t)(COFFEE_SECTOR_SIZE / COFFEE_PAGE_SIZE))
|
||||||
|
|
||||||
struct file {
|
struct file {
|
||||||
coffee_offset_t end;
|
coffee_offset_t end;
|
||||||
|
@ -1177,7 +1179,9 @@ cfs_coffee_format(void)
|
||||||
watchdog_start();
|
watchdog_start();
|
||||||
|
|
||||||
/* All file descriptors have become invalid. */
|
/* All file descriptors have become invalid. */
|
||||||
memset(&coffee_fd_set, 0, sizeof(coffee_fd_set));
|
for(i = 0; i < COFFEE_FD_SET_SIZE; i++) {
|
||||||
|
coffee_fd_set[i].flags = COFFEE_FD_FREE;
|
||||||
|
}
|
||||||
|
|
||||||
PRINTF("done!\n");
|
PRINTF("done!\n");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue