user_namespaces.7: Minor tweaks to example program

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2014-06-02 06:45:13 +02:00
parent 8db3776096
commit 8f99aa89d9
1 changed files with 6 additions and 5 deletions

View File

@ -756,14 +756,15 @@ update_map(char *mapping, char *map_file)
fd = open(map_file, O_RDWR);
if (fd == \-1) {
fprintf(stderr, "ERROR: open %s: %s\\n", map_file, strerror(errno));
return;
//exit(EXIT_FAILURE);
fprintf(stderr, "ERROR: open %s: %s\\n", map_file,
strerror(errno));
exit(EXIT_FAILURE);
}
if (write(fd, mapping, map_len) != map_len) {
fprintf(stderr, "ERROR: write %s: %s\\n", map_file, strerror(errno));
//exit(EXIT_FAILURE);
fprintf(stderr, "ERROR: write %s: %s\\n", map_file,
strerror(errno));
exit(EXIT_FAILURE);
}
close(fd);