diff --git a/helpers.h b/helpers.h index 6dafaf7d..da1e879b 100644 --- a/helpers.h +++ b/helpers.h @@ -42,7 +42,7 @@ #ifndef touch -# define touch(x) mknod((x), S_IFREG|0644, 0) +# define touch(x) do { if (mknod((x), S_IFREG|0644, 0) && errno != EEXIST) _pe("Failed creating %s", x); } while (0) #endif #ifndef chardev # define chardev(x,m,maj,min) mknod((x), S_IFCHR|(m), makedev((maj),(min)))