summaryrefslogtreecommitdiff
path: root/src/install.c
diff options
context:
space:
mode:
authorJannis Hoffmann <jannis@fehcom.de>2024-07-08 13:24:39 +0200
committerJannis Hoffmann <jannis@fehcom.de>2024-07-08 13:24:39 +0200
commit973ae30e7c4f7a1afb385dd3d8eeea178f981445 (patch)
tree1a5d8be5b3ff273a141b6144bf3031b1bc3deb2d /src/install.c
parent66404f0bfbd78e635ff6381ca30b25157e0e1a09 (diff)
fix deprecated prototypes
Diffstat (limited to 'src/install.c')
-rw-r--r--src/install.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/install.c b/src/install.c
index e6f95a9..7ca734d 100644
--- a/src/install.c
+++ b/src/install.c
@@ -7,13 +7,15 @@
#include "logmsg.h"
#include "open.h"
+#include "hier.h"
+
extern void hier();
#define WHO "install"
int fdsourcedir = -1;
-void h(char *home, int uid, int gid, int mode)
+void h(const char *home, int uid, int gid, int mode)
{
if (mkdir(home, 0700) == -1)
if (errno != EEXIST) logmsg(WHO, 111, FATAL, B("unable to mkdir: ", home));
@@ -21,7 +23,7 @@ void h(char *home, int uid, int gid, int mode)
if (chmod(home, mode) == -1) logmsg(WHO, 111, FATAL, B("unable to chmod: ", home));
}
-void d(char *home, char *subdir, int uid, int gid, int mode)
+void d(const char *home, char *subdir, int uid, int gid, int mode)
{
if (chdir(home) == -1) logmsg(WHO, 110, FATAL, B("unable to switch to: ", home));
if (mkdir(subdir, 0700) == -1)
@@ -30,7 +32,7 @@ void d(char *home, char *subdir, int uid, int gid, int mode)
if (chmod(subdir, mode) == -1) logmsg(WHO, 111, FATAL, B("unable to chmod: ", home, "/", subdir));
}
-void p(char *home, char *fifo, int uid, int gid, int mode)
+void p(const char *home, char *fifo, int uid, int gid, int mode)
{
if (chdir(home) == -1) logmsg(WHO, 110, FATAL, B("unable to switch to: ", home));
if (fifo_make(fifo, 0700) == -1)
@@ -44,7 +46,7 @@ buffer bi;
char outbuf[BUFFER_OUTSIZE];
buffer bo;
-void c(char *home, char *subdir, char *file, int uid, int gid, int mode)
+void c(const char *home, char *subdir, char *file, int uid, int gid, int mode)
{
int fdin;
int fdout;
@@ -77,7 +79,7 @@ void c(char *home, char *subdir, char *file, int uid, int gid, int mode)
if (chmod(file, mode) == -1) logmsg(WHO, 111, FATAL, B("unable to chmod .../", subdir, "/", file));
}
-void z(char *home, char *file, int len, int uid, int gid, int mode)
+void z(const char *home, char *file, int len, int uid, int gid, int mode)
{
int fdout;