Simply use getprogname() to obtain the name of the process.

This commit is contained in:
Ed Schouten 2012-01-03 11:08:58 +00:00
parent 1a74905fee
commit c70a327b9f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=229384

View File

@ -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)