Rev 2678 | Rev 2686 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2678 | Rev 2685 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | /* |
1 | /* |
2 | * Copyright (c) 2007 Jakub Jermar |
2 | * Copyright (c) 2008 Jakub Jermar |
3 | * All rights reserved. |
3 | * All rights reserved. |
4 | * |
4 | * |
5 | * Redistribution and use in source and binary forms, with or without |
5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions |
6 | * modification, are permitted provided that the following conditions |
7 | * are met: |
7 | * are met: |
Line 365... | Line 365... | ||
365 | if (!newdata) { |
365 | if (!newdata) { |
366 | ipc_answer_0(callid, ENOMEM); |
366 | ipc_answer_0(callid, ENOMEM); |
367 | ipc_answer_1(rid, EOK, 0); |
367 | ipc_answer_1(rid, EOK, 0); |
368 | return; |
368 | return; |
369 | } |
369 | } |
- | 370 | /* Clear any newly allocated memory in order to emulate gaps. */ |
|
- | 371 | memset(dentry->data + dentry->size, 0, delta); |
|
370 | dentry->size += delta; |
372 | dentry->size += delta; |
371 | dentry->data = newdata; |
373 | dentry->data = newdata; |
372 | (void) ipc_data_write_finalize(callid, dentry->data + pos, len); |
374 | (void) ipc_data_write_finalize(callid, dentry->data + pos, len); |
373 | ipc_answer_1(rid, EOK, len); |
375 | ipc_answer_1(rid, EOK, len); |
374 | } |
376 | } |