Date: Thu, 3 Jun 2010 20:46:24 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r208792 - head/usr.sbin/chown Message-ID: <201006032046.o53KkO8a088508@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trasz Date: Thu Jun 3 20:46:23 2010 New Revision: 208792 URL: http://svn.freebsd.org/changeset/base/208792 Log: Make chown(1) emit more useful error message when user/group name is invalid. Modified: head/usr.sbin/chown/chown.c Modified: head/usr.sbin/chown/chown.c ============================================================================== --- head/usr.sbin/chown/chown.c Thu Jun 3 18:34:34 2010 (r208791) +++ head/usr.sbin/chown/chown.c Thu Jun 3 20:46:23 2010 (r208792) @@ -262,9 +262,7 @@ id(const char *name, const char *type) */ errno = 0; val = strtoul(name, &ep, 10); - if (errno) - err(1, "%s", name); - if (*ep != '\0') + if (errno || *ep != '\0') errx(1, "%s: illegal %s name", name, type); return (val); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006032046.o53KkO8a088508>