aboutsummaryrefslogtreecommitdiffstats
path: root/src/cmdline.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-05-14 21:54:05 +0200
committerMattias Andrée <maandree@operamail.com>2015-05-14 21:54:05 +0200
commitff7fe9ed7310e9426e5056fca19febbacde55401 (patch)
tree052f6785b271043902c9e3586bdae2f1e2f8abd0 /src/cmdline.c
parentadd chmod, chown and chgrp to the command line tool (diff)
downloadbus-ff7fe9ed7310e9426e5056fca19febbacde55401.tar.gz
bus-ff7fe9ed7310e9426e5056fca19febbacde55401.tar.bz2
bus-ff7fe9ed7310e9426e5056fca19febbacde55401.tar.xz
doc bus-chgrp, bus-chown, and bus-chmod
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/cmdline.c')
-rw-r--r--src/cmdline.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmdline.c b/src/cmdline.c
index a80c462..c23d185 100644
--- a/src/cmdline.c
+++ b/src/cmdline.c
@@ -345,7 +345,7 @@ main(int argc, char *argv[])
/* TODO add -n */
/* Change permissions. */
- } else if ((argc == 4) && !strcmp(argv[1], "chmod")) { /* TODO doc */
+ } else if ((argc == 4) && !strcmp(argv[1], "chmod")) {
t(parse_mode(argv[2], &mode_andnot, &mode_or));
t(stat(argv[3], &attr));
attr.st_mode &= ~mode_andnot;
@@ -353,7 +353,7 @@ main(int argc, char *argv[])
t(bus_chmod(argv[3], attr.st_mode));
/* Change ownership. */
- } else if ((argc == 4) && !strcmp(argv[1], "chown")) { /* TODO doc */
+ } else if ((argc == 4) && !strcmp(argv[1], "chown")) {
if (strchr(argv[2], ':')) {
t(parse_owner(argv[2], &uid, &gid));
t(bus_chown(argv[3], uid, gid));
@@ -364,7 +364,7 @@ main(int argc, char *argv[])
}
/* Change group. */
- } else if ((argc == 4) && !strcmp(argv[1], "chgrp")) { /* TODO doc */
+ } else if ((argc == 4) && !strcmp(argv[1], "chgrp")) {
t(parse_owner(argv[2], NULL, &gid));
t(stat(argv[3], &attr));
t(bus_chown(argv[3], attr.st_uid, gid));