Skip to content

Commit

Permalink
fix for 32-bit systems to shmem segment keys used by imager
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii committed Jan 27, 2012
1 parent 9f40094 commit 29b69bb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion storage/vmdk_shim.c
Expand Up @@ -358,7 +358,13 @@ int main (int argc, char * argv[])
}

// find, using the key, and attach the shared memory segment created by the parent process
key_t key = (key_t) atoi (argv[1]);
char * endptr;
errno = 0;
key_t key = (key_t) strtoull (argv[1], &endptr, 0);
if (errno != 0) {
logprintfl (EUCAERROR, "%s: failed to parse shmem region key number on command line (%s)\n", argv[0], argv[1]);
exit (1);
}
struct vmdk_shmem * shm = find_shmem (key);
if (shm == NULL)
exit (1);
Expand Down

0 comments on commit 29b69bb

Please sign in to comment.