From owner-cvs-src@FreeBSD.ORG Wed Apr 23 00:49:13 2008 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 687161065672; Wed, 23 Apr 2008 00:49:13 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6B96C8FC12; Wed, 23 Apr 2008 00:49:13 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m3N0nDkG030624; Wed, 23 Apr 2008 00:49:13 GMT (envelope-from scf@repoman.freebsd.org) Received: (from scf@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m3N0nDwb030623; Wed, 23 Apr 2008 00:49:13 GMT (envelope-from scf) Message-Id: <200804230049.m3N0nDwb030623@repoman.freebsd.org> From: Sean Farley Date: Wed, 23 Apr 2008 00:49:13 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/lib/libutil Makefile gr_util.c libutil.h src/tools/regression/lib/libutil Makefile test-grp.c test-grp.t X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Apr 2008 00:49:13 -0000 scf 2008-04-23 00:49:13 UTC FreeBSD src repository Modified files: lib/libutil Makefile libutil.h tools/regression/lib/libutil Makefile Added files: lib/libutil gr_util.c tools/regression/lib/libutil test-grp.c test-grp.t Log: Add four utility functions related to struct grp processing modeled in-part after similar calls related to struct pwd in libutil/pw_util.c: - gr_equal() Perform a deep comparison of two struct grp's. It does a thorough, yet unoptimized comparison of all the members regardless of order. - gr_make() Create a string (see group(5)) from a struct grp. - gr_dup() Duplicate a struct grp. Returns a value that is a single contiguous block of memory. - gr_scan() Create a struct grp from a string (as produced by gr_make()). MFC after: 3 weeks Revision Changes Path 1.67 +1 -1 src/lib/libutil/Makefile 1.1 +234 -0 src/lib/libutil/gr_util.c (new) 1.47 +7 -0 src/lib/libutil/libutil.h 1.3 +1 -1 src/tools/regression/lib/libutil/Makefile 1.1 +117 -0 src/tools/regression/lib/libutil/test-grp.c (new) 1.1 +12 -0 src/tools/regression/lib/libutil/test-grp.t (new)