summaryrefslogtreecommitdiff
path: root/src/rc/checkpath.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-01-11 15:51:40 +0000
committerRoy Marples <roy@marples.name>2008-01-11 15:51:40 +0000
commitabde759d5bf6028135667779297d30491f1f4688 (patch)
tree079a40a45ce9199933cc3c0367d671804289018f /src/rc/checkpath.c
parentfec312d4482e17328394f3e87b4ad28b1f062b7f (diff)
downloadopenrc-abde759d5bf6028135667779297d30491f1f4688.tar.gz
openrc-abde759d5bf6028135667779297d30491f1f4688.tar.bz2
openrc-abde759d5bf6028135667779297d30491f1f4688.tar.xz
Re-indent to a standard tw of 8.
Diffstat (limited to 'src/rc/checkpath.c')
-rw-r--r--src/rc/checkpath.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/rc/checkpath.c b/src/rc/checkpath.c
index 612a076..db81a63 100644
--- a/src/rc/checkpath.c
+++ b/src/rc/checkpath.c
@@ -75,7 +75,7 @@ static int do_check (char *path, uid_t uid, gid_t gid, mode_t mode, int file)
}
} else {
if ((file && S_ISDIR (st.st_mode)) ||
- (! file && ! S_ISDIR (st.st_mode)))
+ (! file && ! S_ISDIR (st.st_mode)))
{
if (file)
eerror ("%s: is a directory", path);
@@ -84,7 +84,7 @@ static int do_check (char *path, uid_t uid, gid_t gid, mode_t mode, int file)
return (-1);
}
}
-
+
if (mode && (st.st_mode & 0777) != mode) {
einfo ("%s: correcting mode", applet);
if (chmod (path, mode)) {
@@ -126,7 +126,7 @@ static int parse_mode (mode_t *mode, char *text)
}
static int parse_owner (struct passwd **user, struct group **group,
- const char *owner)
+ const char *owner)
{
char *u = xstrdup (owner);
char *g = strchr (u, ':');
@@ -164,7 +164,7 @@ static int parse_owner (struct passwd **user, struct group **group,
static struct option longopts[] = {
{ "directory", 0, NULL, 'd'},
{ "file", 0, NULL, 'f'},
- { "mode", 1, NULL, 'm'},
+ { "mode", 1, NULL, 'm'},
{ "owner", 1, NULL, 'o'},
longopts_COMMON
};
@@ -191,7 +191,7 @@ int checkpath (int argc, char **argv)
applet = basename_c (argv[0]);
while ((opt = getopt_long (argc, argv, getoptstring,
- longopts, (int *) 0)) != -1)
+ longopts, (int *) 0)) != -1)
{
switch (opt) {
case 'd':
@@ -202,11 +202,13 @@ int checkpath (int argc, char **argv)
break;
case 'm':
if (parse_mode (&mode, optarg) != 0)
- eerrorx ("%s: invalid mode `%s'", applet, optarg);
+ eerrorx ("%s: invalid mode `%s'",
+ applet, optarg);
break;
case 'o':
if (parse_owner (&pw, &gr, optarg) != 0)
- eerrorx ("%s: owner `%s' not found", applet, optarg);
+ eerrorx ("%s: owner `%s' not found",
+ applet, optarg);
break;
case_RC_COMMON_GETOPT