summaryrefslogtreecommitdiffstats
path: root/usr.sbin/quotaon
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2012-01-03 11:08:58 +0000
committered <ed@FreeBSD.org>2012-01-03 11:08:58 +0000
commit2f0ccab6690ab730f79c8e9bdc4b2ae2d4e144a6 (patch)
treed3ff7f08c94dc2f925737ddb885d4eb87fbe1e54 /usr.sbin/quotaon
parente8a395e7c137cec3613839af03daa761a64f3bda (diff)
downloadFreeBSD-src-2f0ccab6690ab730f79c8e9bdc4b2ae2d4e144a6.zip
FreeBSD-src-2f0ccab6690ab730f79c8e9bdc4b2ae2d4e144a6.tar.gz
Simply use getprogname() to obtain the name of the process.
Diffstat (limited to 'usr.sbin/quotaon')
-rw-r--r--usr.sbin/quotaon/quotaon.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/usr.sbin/quotaon/quotaon.c b/usr.sbin/quotaon/quotaon.c
index d510e80..8d52983 100644
--- a/usr.sbin/quotaon/quotaon.c
+++ b/usr.sbin/quotaon/quotaon.c
@@ -75,13 +75,11 @@ int
main(int argc, char **argv)
{
struct fstab *fs;
- char *whoami;
+ const char *whoami;
long argnum, done = 0;
int ch, i, offmode = 0, errs = 0;
- whoami = rindex(*argv, '/') + 1;
- if (whoami == (char *)1)
- whoami = *argv;
+ whoami = getprogname();
if (strcmp(whoami, "quotaoff") == 0)
offmode++;
else if (strcmp(whoami, "quotaon") != 0)
OpenPOWER on IntegriCloud