map creation is typically the first one to fail when rlimits are
too low, not enough memory, etc
Make this failure scenario more verbose
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
                                           maps[i].key_size,
                                           maps[i].value_size,
                                           maps[i].max_entries);
-               if (map_fd[i] < 0)
+               if (map_fd[i] < 0) {
+                       printf("failed to create a map: %d %s\n",
+                              errno, strerror(errno));
                        return 1;
+               }
 
                if (maps[i].type == BPF_MAP_TYPE_PROG_ARRAY)
                        prog_array_fd = map_fd[i];