From owner-cvs-all Sun Feb 17 16:37: 7 2002 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id E837B37B400; Sun, 17 Feb 2002 16:37:03 -0800 (PST) Received: (from rwatson@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g1I0b3P29232; Sun, 17 Feb 2002 16:37:03 -0800 (PST) (envelope-from rwatson) Message-Id: <200202180037.g1I0b3P29232@freefall.freebsd.org> From: Robert Watson Date: Sun, 17 Feb 2002 16:37:03 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/conf files src/sys/libkern strvalid.c src/sys/sys libkern.h X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG rwatson 2002/02/17 16:37:03 PST Modified files: sys/conf files sys/sys libkern.h Added files: sys/libkern strvalid.c Log: Add a 'strvalid()' call to libkern. Given a character pointer, and buffer length, determine if the pointer is to a valid string. Currently, the only check is whether a '\0' appears in the buffer. This is useful when pulling in a structure from userland that may contain one or more strings, and validity testing must be performed on elements of the structure. When copying normal string arguments, copyinstr() is expected to be used. Revision Changes Path 1.600 +1 -0 src/sys/conf/files 1.1 +55 -0 src/sys/libkern/strvalid.c (new) 1.28 +2 -1 src/sys/sys/libkern.h To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message