From owner-p4-projects@FreeBSD.ORG Wed Nov 23 22:38:33 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8A4A816A424; Wed, 23 Nov 2005 22:38:32 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5939716A423 for ; Wed, 23 Nov 2005 22:38:32 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8B18E43D6B for ; Wed, 23 Nov 2005 22:38:31 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id jANMcVi2098221 for ; Wed, 23 Nov 2005 22:38:31 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id jANMcV0x098218 for perforce@freebsd.org; Wed, 23 Nov 2005 22:38:31 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 23 Nov 2005 22:38:31 GMT Message-Id: <200511232238.jANMcV0x098218@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 87155 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2005 22:38:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=87155 Change 87155 by rwatson@rwatson_zoo on 2005/11/23 22:38:10 Fix up printfs. Only printf for device creation of the device is "interesting". Affected files ... .. //depot/projects/trustedbsd/mac/sys/security/mac_devfs/mac_devfs.c#3 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/security/mac_devfs/mac_devfs.c#3 (text+ko) ==== @@ -66,6 +66,17 @@ #include +static int +interesting(const char *str1, const char *str2) +{ + + if (str1 == NULL || str2 == NULL) + return (0); + if (strcmp(str1, str2) == 0) + return (0); + return (1); +} + static void mac_devfs_associate_vnode_devfs(struct mount *mp, struct label *fslabel, struct devfs_dirent *de, struct label *delabel, struct vnode *vp, @@ -80,8 +91,11 @@ const char *fullpath) { + if (!interesting(dev->si_name, fullpath)) + return; + printf("mac_devfs_create_devfs_device(uid %d mp %s cdev %s " - "fullpath %s", cred != NULL ? cred->cr_uid : -1, + "fullpath %s)\n", cred != NULL ? cred->cr_uid : -1, mp->mnt_stat.f_mntonname, dev->si_name, fullpath); } @@ -91,8 +105,8 @@ const char *fullpath) { - printf("mac_devfs_create_devfs_device(mp %s dirname %s fullpath %s", - mp->mnt_stat.f_mntonname, dirname, fullpath); + printf("mac_devfs_create_devfs_directory(mp %s dirname %s " + "fullpath %s)\n", mp->mnt_stat.f_mntonname, dirname, fullpath); } static void @@ -101,7 +115,7 @@ struct label *delabel, const char *fullpath) { - printf("mac_devfs_create_devfs_device(uid %d mp %s fullpath %s", + printf("mac_devfs_create_devfs_symlink(uid %d mp %s fullpath %s)\n", cred != NULL ? cred->cr_uid : -1, mp->mnt_stat.f_mntonname, fullpath); }