From owner-svn-src-head@freebsd.org Thu Jun 9 13:17:09 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B9B4B6F50E; Thu, 9 Jun 2016 13:17:09 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C865189E; Thu, 9 Jun 2016 13:17:09 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u59DH816072081; Thu, 9 Jun 2016 13:17:08 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u59DH8Wa072080; Thu, 9 Jun 2016 13:17:08 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201606091317.u59DH8Wa072080@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 9 Jun 2016 13:17:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301727 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jun 2016 13:17:09 -0000 Author: markj Date: Thu Jun 9 13:17:08 2016 New Revision: 301727 URL: https://svnweb.freebsd.org/changeset/base/301727 Log: Fix some cosmetic issues in kern_fail.c omitted from r296927. Obtained from: Matthew Bryan Modified: head/sys/kern/kern_fail.c Modified: head/sys/kern/kern_fail.c ============================================================================== --- head/sys/kern/kern_fail.c Thu Jun 9 13:04:57 2016 (r301726) +++ head/sys/kern/kern_fail.c Thu Jun 9 13:17:08 2016 (r301727) @@ -82,13 +82,13 @@ static MALLOC_DEFINE(M_FAIL_POINT, "Fail #define fp_malloc(size, flags) malloc((size), M_FAIL_POINT, (flags)) #define fs_free(ptr) fp_free(ptr) #define fs_malloc() fp_malloc(sizeof(struct fail_point_setting), \ - M_WAITOK | M_ZERO) + M_WAITOK | M_ZERO) - /** - * These define the wchans that are used for sleeping, pausing respectively. - * They are chosen arbitrarily but need to be distinct to the failpoint and - * the sleep/pause distinction. - */ +/** + * These define the wchans that are used for sleeping, pausing respectively. + * They are chosen arbitrarily but need to be distinct to the failpoint and + * the sleep/pause distinction. + */ #define FP_SLEEP_CHANNEL(fp) (void*)(fp) #define FP_PAUSE_CHANNEL(fp) __DEVOLATILE(void*, &fp->fp_setting) @@ -166,7 +166,7 @@ struct fail_point_entry { enum fail_point_t fe_type; /**< type of entry */ int fe_arg; /**< argument to type (e.g. return value) */ int fe_prob; /**< likelihood of firing in millionths */ - int fe_count; /**< number of times to fire, -1 means infinite */ + int32_t fe_count; /**< number of times to fire, -1 means infinite */ pid_t fe_pid; /**< only fail for this process */ struct fail_point *fe_parent; /**< backpointer to fp */ TAILQ_ENTRY(fail_point_entry) fe_entries; /**< next entry ptr */ @@ -354,7 +354,7 @@ fail_point_eval_swap_out(struct fail_poi /* Free up any zero-ref entries in the garbage queue */ static void -fail_point_garbage_collect() +fail_point_garbage_collect(void) { struct fail_point_setting *fs_current, *fs_next; struct fail_point_setting_garbage fp_ents_free_list; @@ -441,7 +441,7 @@ fail_point_sleep(struct fail_point *fp, fp->fp_pre_sleep_fn(fp->fp_pre_sleep_arg); timeout(fp->fp_post_sleep_fn, fp->fp_post_sleep_arg, - timo); + timo); *pret = FAIL_POINT_RC_QUEUED; } } @@ -635,7 +635,6 @@ abort: fail_point_setting_release_ref(fp); return (ret); - } /** @@ -844,19 +843,17 @@ end: /** * Handle kernel failpoint set/get. */ - int fail_point_sysctl(SYSCTL_HANDLER_ARGS) { struct fail_point *fp; char *buf; - struct sbuf *sb_check; - struct sbuf sb; + struct sbuf sb, *sb_check; int error; + buf = NULL; error = 0; fp = arg1; - buf = NULL; sb_check = sbuf_new(&sb, NULL, 1024, SBUF_AUTOEXTEND); if (sb_check != &sb) @@ -949,7 +946,6 @@ fail_sysctl_drain_func(void *sysctl_args return (len); } - /** * Internal helper function to translate a human-readable failpoint string * into a internally-parsable fail_point structure.