From nobody Mon May 06 16:19:20 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VY66w4QNHz5KWc0; Mon, 06 May 2024 16:19:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VY66w3vndz4Zgs; Mon, 6 May 2024 16:19:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715012360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T3ge//IGrqSYaBASECvdgddKqzr6+EDEiJWtDrqiLM0=; b=oWNK7ab1Hz2onNLgMgUXIN20QTxlpigXBYQgHBpmypIKym9OB2CUKCQP6deYsxS1T0oGGk aWIiBtVjhTZNBlwsNLqcIH4zZhHvPq+BhrZNZUk9UNWUYtwivcftF0nXcNKVTh1bgdH3gH sOvDuEpBzEX+v2y2aQEigRSY8ADjn5QX/1kAIstHLqC4nbzyvMOHQR6WtdZIJrhU5iiPCU RDs2pD2Y+L+ewCFLAD/RycuiR3ZddFItCPASHE6vAta+8P37kB6CAw25zk8jkx5YtT6Ivi i8vOIwW4ehB71UB6LSwx4QfMmYM0H9CS4xMNj1aY/8mLcZPfY7/eJofnqQy4oQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715012360; a=rsa-sha256; cv=none; b=MiF9dYYoQoZ7YH9L/I8t0WEHDy8ZRL4lQClvdGvLESDrjPInsGMK6rJA7bWhw2dojYY3nJ KLn4nhRTc+PYV3v4PswgyGtOZC1KrV4ml9GP0LWyLxU0FKVIsRNismoSJAWdZvXHcmuHCo NkhhkdZyYx8Ru1N1R12ID2KDZuRtOGpP5Hncw/Yn7j+mal4yuy0vlPJKv2G/ziAGVrc3zg pHwWcirE62LR+i4Us5oQeXU/kEBNxXyiPdp/fJ/FwbDBsATWGNF2SP+QQcusaDs5RHUp07 HbC+hnH3R3Oskrd12L2oAxmTc8i9W0EbRvbxRjdJyUl/K1IpzgMVS/iXpC5ssA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715012360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T3ge//IGrqSYaBASECvdgddKqzr6+EDEiJWtDrqiLM0=; b=g1tHb/TUrio6O+js1jP4mEhG2JvQnamPjMRm5U96965eSqPCKv4d8ywsgRZ4KeFdpTs6rH o5357/6zGEfnYZeD4V55jpUf6TNa68C+hrdVoixiZw/iILzTf3utJQPZOhvtgKMSZMmy0S 9Gm8pQx38j7HGbHLYHxpnc/BzBS3ik8077sh2UTuhcE8TDAoFdirOJVrmk0ZTILlLs+t1r 0PrFaG5Hy9Z+QUQEADGGpZs4PEd2yOPmLgqeU47ooPnUvychBE1vSwJepw6BulEINYX3I8 URXmsf0oJWrdEzKxAOwG+eBfsA/h6zCNz6FJSlcndR6IwSj2PiQdOGC8FKcjog== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VY66w3WGgz14Lk; Mon, 6 May 2024 16:19:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 446GJKIG022704; Mon, 6 May 2024 16:19:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 446GJKwV022701; Mon, 6 May 2024 16:19:20 GMT (envelope-from git) Date: Mon, 6 May 2024 16:19:20 GMT Message-Id: <202405061619.446GJKwV022701@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: a9ea647c29cf - main - pw: Rename some enums. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a9ea647c29cf510a164947251de0d34f53f2bca0 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=a9ea647c29cf510a164947251de0d34f53f2bca0 commit a9ea647c29cf510a164947251de0d34f53f2bca0 Author: Dag-Erling Smørgrav AuthorDate: 2024-05-06 16:18:39 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-05-06 16:18:39 +0000 pw: Rename some enums. Rename `M_PRINT` and `M_UPDATE` to `M_SHOW` and `M_MODIFY` to match the names of the commands they represent. No functional change intended. MFC after: 3 days Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D45096 --- usr.sbin/pw/pw.h | 20 ++++++++++---------- usr.sbin/pw/pw_group.c | 4 ++-- usr.sbin/pw/pw_user.c | 6 +++--- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/usr.sbin/pw/pw.h b/usr.sbin/pw/pw.h index 5de333ce5e71..e8ec95079fec 100644 --- a/usr.sbin/pw/pw.h +++ b/usr.sbin/pw/pw.h @@ -36,14 +36,14 @@ enum _mode { - M_ADD, - M_DELETE, - M_UPDATE, - M_PRINT, + M_ADD, + M_DELETE, + M_MODIFY, + M_SHOW, M_NEXT, M_LOCK, M_UNLOCK, - M_NUM + M_NUM }; enum _passmode @@ -56,13 +56,13 @@ enum _passmode enum _which { - W_USER, - W_GROUP, - W_NUM + W_USER, + W_GROUP, + W_NUM }; -#define _DEF_DIRMODE (S_IRWXU | S_IRWXG | S_IRWXO) -#define _PW_CONF "pw.conf" +#define _DEF_DIRMODE (S_IRWXU | S_IRWXG | S_IRWXO) +#define _PW_CONF "pw.conf" #define _UC_MAXLINE 1024 #define _UC_MAXSHELLS 32 diff --git a/usr.sbin/pw/pw_group.c b/usr.sbin/pw/pw_group.c index 32dec769fb1a..b2777177b9e6 100644 --- a/usr.sbin/pw/pw_group.c +++ b/usr.sbin/pw/pw_group.c @@ -697,11 +697,11 @@ pw_group_mod(int argc, char **argv, char *arg1) if ((grp = GETGRNAM(name)) == NULL) errx(EX_SOFTWARE, "group disappeared during update"); - pw_log(cnf, M_UPDATE, W_GROUP, "%s(%ju)", grp->gr_name, + pw_log(cnf, M_MODIFY, W_GROUP, "%s(%ju)", grp->gr_name, (uintmax_t)grp->gr_gid); if (nis && nis_update() == 0) - pw_log(cnf, M_UPDATE, W_GROUP, "NIS maps updated"); + pw_log(cnf, M_MODIFY, W_GROUP, "NIS maps updated"); return (EXIT_SUCCESS); } diff --git a/usr.sbin/pw/pw_user.c b/usr.sbin/pw/pw_user.c index 6875d931a1d2..66f021fff983 100644 --- a/usr.sbin/pw/pw_user.c +++ b/usr.sbin/pw/pw_user.c @@ -146,7 +146,7 @@ create_and_populate_homedir(struct userconf *cnf, struct passwd *pwd, copymkdir(conf.rootfd, pwd->pw_dir, skelfd, homemode, pwd->pw_uid, pwd->pw_gid, 0); - pw_log(cnf, update ? M_UPDATE : M_ADD, W_USER, "%s(%ju) home %s made", + pw_log(cnf, update ? M_MODIFY : M_ADD, W_USER, "%s(%ju) home %s made", pwd->pw_name, (uintmax_t)pwd->pw_uid, pwd->pw_dir); } @@ -1787,7 +1787,7 @@ pw_user_mod(int argc, char **argv, char *arg1) if (pwd == NULL) errx(EX_NOUSER, "user '%s' disappeared during update", name); grp = GETGRGID(pwd->pw_gid); - pw_log(cnf, M_UPDATE, W_USER, "%s(%ju):%s(%ju):%s:%s:%s", + pw_log(cnf, M_MODIFY, W_USER, "%s(%ju):%s(%ju):%s:%s:%s", pwd->pw_name, (uintmax_t)pwd->pw_uid, grp ? grp->gr_name : "unknown", (uintmax_t)(grp ? grp->gr_gid : (uid_t)-1), @@ -1808,7 +1808,7 @@ pw_user_mod(int argc, char **argv, char *arg1) } if (nis && nis_update() == 0) - pw_log(cnf, M_UPDATE, W_USER, "NIS maps updated"); + pw_log(cnf, M_MODIFY, W_USER, "NIS maps updated"); return (EXIT_SUCCESS); }