summaryrefslogtreecommitdiffstats
path: root/usr.sbin/quotaon/quotaon.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/quotaon/quotaon.c')
-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