Change "chown" to coreutils syntax.
Change-Id: I7d997b3254354908317feee54b6df9b2419718a6
diff --git a/toolbox/chown.c b/toolbox/chown.c
index e9d108b..576c904 100644
--- a/toolbox/chown.c
+++ b/toolbox/chown.c
@@ -15,7 +15,7 @@
int i;
if (argc < 3) {
- fprintf(stderr, "Usage: chown <USER>[.GROUP] <FILE1> [FILE2] ...\n");
+ fprintf(stderr, "Usage: chown <USER>[:GROUP] <FILE1> [FILE2] ...\n");
return 10;
}
@@ -24,7 +24,9 @@
char user[32];
char *group = NULL;
strncpy(user, argv[1], sizeof(user));
- if ((group = strchr(user, '.')) != NULL) {
+ if ((group = strchr(user, ':')) != NULL) {
+ *group++ = '\0';
+ } else if ((group = strchr(user, '.')) != NULL) {
*group++ = '\0';
}