Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
51833023
Commit
51833023
authored
Jul 29, 2003
by
Leigh B. Stoller
Browse files
Fix minor type cast error when computing the number of blocks from the
size of the file.
parent
2bfb2a77
Changes
1
Hide whitespace changes
Inline
Side-by-side
os/frisbee.redux/server.c
View file @
51833023
...
...
@@ -862,7 +862,7 @@ main(int argc, char **argv)
pfatal
(
"Cannot lseek to end of file"
);
FileInfo
.
fd
=
fd
;
FileInfo
.
blocks
=
(
int
)
roundup
(
fsize
,
BLOCKSIZE
)
/
BLOCKSIZE
;
FileInfo
.
blocks
=
(
int
)
(
roundup
(
fsize
,
(
off_t
)
BLOCKSIZE
)
/
BLOCKSIZE
)
;
FileInfo
.
chunks
=
FileInfo
.
blocks
/
CHUNKSIZE
;
log
(
"Opened %s: %d blocks"
,
filename
,
FileInfo
.
blocks
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment