[CRIU] Re: [PATCH v3 3/4] IPC: restore shared memory
Kinsbursky Stanislav
skinsbursky at openvz.org
Thu Feb 9 03:15:08 EST 2012
08.02.2012 21:45, Pavel Emelyanov пишет:
> On 02/08/2012 09:27 PM, Kinsbursky Stanislav wrote:
>>
>> Signed-off-by: Stanislav Kinsbursky<skinsbursky at parallels.com>
>>
>> ---
>> ipc_ns.c | 109 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
>> 1 files changed, 107 insertions(+), 2 deletions(-)
>>
>> diff --git a/ipc_ns.c b/ipc_ns.c
>> index eda3399..5c4d27f 100644
>> --- a/ipc_ns.c
>> +++ b/ipc_ns.c
>> @@ -13,6 +13,14 @@
>> #include "namespaces.h"
>> #include "sysctl.h"
>>
>> +#ifndef IPC_PRESET
>> +#define IPC_PRESET 00040000
>> +#endif
>> +
>> +#ifndef SHM_SET
>> +#define SHM_SET 15
>> +#endif
>> +
>> static void print_ipc_seg(const struct ipc_seg *seg)
>> {
>> pr_info("id: %-10d key: 0x%08x ", seg->id, seg->key);
>> @@ -160,8 +168,12 @@ static int dump_ipc_shm(int fd)
>> int id, ret;
>>
>> id = shmctl(i, SHM_STAT,&ds);
>> - if (id< 0)
>> - continue;
>> + if (id< 0) {
>> + if (errno == EINVAL)
>> + continue;
>> + pr_perror("Failed to get stats for IPC shared memory\n");
>> + break;
>> + }
>> ret = dump_ipc_shm_seg(fd, id,&ds);
>> if (ret< 0)
>> return ret;
> What does this hunk do here?
Yep...
--
Best regards,
Stanislav Kinsbursky
More information about the CRIU
mailing list