Lines 1-6
Link Here
|
1 |
|
|
|
2 |
$FreeBSD$ |
3 |
|
4 |
--- erts/emulator/drivers/common/efile_drv.c.orig |
1 |
--- erts/emulator/drivers/common/efile_drv.c.orig |
5 |
+++ erts/emulator/drivers/common/efile_drv.c |
2 |
+++ erts/emulator/drivers/common/efile_drv.c |
6 |
@@ -311,6 +311,18 @@ |
3 |
@@ -311,6 +311,18 @@ |
Lines 285-291
Link Here
|
285 |
DTRACE_INVOKE_RETURN(FILE_FADVISE); |
282 |
DTRACE_INVOKE_RETURN(FILE_FADVISE); |
286 |
} |
283 |
} |
287 |
|
284 |
|
288 |
@@ -1906,6 +1968,7 @@ |
285 |
@@ -1901,11 +1963,14 @@ |
|
|
286 |
d->result_ok = 1; |
287 |
if (d->c.sendfile.nbytes != 0) |
288 |
d->c.sendfile.nbytes -= nbytes; |
289 |
+ } else if (nbytes == 0 && d->c.sendfile.nbytes == 0) { |
290 |
+ d->result_ok = 1; |
291 |
} else |
292 |
d->result_ok = 0; |
289 |
} else { |
293 |
} else { |
290 |
d->result_ok = -1; |
294 |
d->result_ok = -1; |
291 |
} |
295 |
} |
Lines 293-299
Link Here
|
293 |
} |
297 |
} |
294 |
|
298 |
|
295 |
static void free_sendfile(void *data) { |
299 |
static void free_sendfile(void *data) { |
296 |
@@ -2023,6 +2086,21 @@ |
300 |
@@ -2023,6 +2088,21 @@ |
297 |
return; |
301 |
return; |
298 |
TRACE_F(("x%i", (int) d->command)); |
302 |
TRACE_F(("x%i", (int) d->command)); |
299 |
d->again = sys_info.async_threads == 0; |
303 |
d->again = sys_info.async_threads == 0; |
Lines 315-321
Link Here
|
315 |
DRIVER_ASYNC(d->level, desc, d->invoke, void_ptr=d, d->free); |
319 |
DRIVER_ASYNC(d->level, desc, d->invoke, void_ptr=d, d->free); |
316 |
} |
320 |
} |
317 |
|
321 |
|
318 |
@@ -2247,6 +2325,8 @@ |
322 |
@@ -2247,6 +2327,8 @@ |
319 |
return; |
323 |
return; |
320 |
} |
324 |
} |
321 |
|
325 |
|
Lines 324-330
Link Here
|
324 |
switch (d->command) |
328 |
switch (d->command) |
325 |
{ |
329 |
{ |
326 |
case FILE_READ: |
330 |
case FILE_READ: |
327 |
@@ -2375,6 +2455,10 @@ |
331 |
@@ -2375,6 +2457,10 @@ |
328 |
} else { |
332 |
} else { |
329 |
desc->fd = d->fd; |
333 |
desc->fd = d->fd; |
330 |
desc->flags = d->flags; |
334 |
desc->flags = d->flags; |