Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys



In article <20170104010558.7643EFBAE%cvs.NetBSD.org@localhost>,
Paul Goyette <source-changes-d%NetBSD.org@localhost> wrote:
>-=-=-=-=-=-
>
>Module Name:	src
>Committed By:	pgoyette
>Date:		Wed Jan  4 01:05:58 UTC 2017
>
>Modified Files:
>	src/sys/kern: kern_history.c
>	src/sys/sys: kernhist.h
>
>Log Message:
>Rearrange the sysctl export structure for better alignment.
>
>
>To generate a diff of this commit:
>cvs rdiff -u -r1.9 -r1.10 src/sys/kern/kern_history.c
>cvs rdiff -u -r1.14 -r1.15 src/sys/sys/kernhist.h
>
>Please note that diffs are not public domain; they are subject to the
>copyright notices on the relevant files.
>
>
>-=-=-=-=-=-
>
>Modified files:
>
>Index: src/sys/kern/kern_history.c
>diff -u src/sys/kern/kern_history.c:1.9 src/sys/kern/kern_history.c:1.10
>--- src/sys/kern/kern_history.c:1.9	Sun Jan  1 23:58:47 2017
>+++ src/sys/kern/kern_history.c	Wed Jan  4 01:05:58 2017
>@@ -1,4 +1,4 @@
>-/*	$NetBSD: kern_history.c,v 1.9 2017/01/01 23:58:47 pgoyette Exp $	 */
>+/*	$NetBSD: kern_history.c,v 1.10 2017/01/04 01:05:58 pgoyette Exp $	 */
> 
> /*
>  * Copyright (c) 1997 Charles D. Cranor and Washington University.
>@@ -33,7 +33,7 @@
>  */
> 
> #include <sys/cdefs.h>
>-__KERNEL_RCSID(0, "$NetBSD: kern_history.c,v 1.9 2017/01/01 23:58:47
>pgoyette Exp $");
>+__KERNEL_RCSID(0, "$NetBSD: kern_history.c,v 1.10 2017/01/04 01:05:58
>pgoyette Exp $");
> 
> #include "opt_ddb.h"
> #include "opt_kernhist.h"
>@@ -466,7 +466,8 @@ sysctl_kernhist_helper(SYSCTLFN_ARGS)
> 			out_evt->she_fmtoffset = 0;
> 			continue;
> 		}
>-		TIMEVAL_TO_TIMESPEC(&in_evt->tv, &out_evt->she_tspec);
>+		out_evt->she_time_sec = in_evt->tv.tv_sec;
>+		out_evt->she_time_usec = in_evt->tv.tv_usec;
> 		out_evt->she_callnumber = in_evt->call;
> 		out_evt->she_cpunum = in_evt->cpunum;
> 		out_evt->she_values[0] = in_evt->v[0];
>
>Index: src/sys/sys/kernhist.h
>diff -u src/sys/sys/kernhist.h:1.14 src/sys/sys/kernhist.h:1.15
>--- src/sys/sys/kernhist.h:1.14	Sun Jan  1 23:58:47 2017
>+++ src/sys/sys/kernhist.h	Wed Jan  4 01:05:58 2017
>@@ -1,4 +1,4 @@
>-/*	$NetBSD: kernhist.h,v 1.14 2017/01/01 23:58:47 pgoyette Exp $	*/
>+/*	$NetBSD: kernhist.h,v 1.15 2017/01/04 01:05:58 pgoyette Exp $	*/
> 
> /*
>  * Copyright (c) 1997 Charles D. Cranor and Washington University.
>@@ -80,13 +80,14 @@ struct sysctl_history_list_entry {
> 
> /* info for a single history event */
> struct sysctl_history_event {
>-	struct timespec	she_tspec;
>+	time_t		she_time_sec;
>+	uint32_t	she_time_usec;
>+	uint32_t	she_filler;

I would make those explicitly sized types, uint64_t x 2

christos



Home | Main Index | Thread Index | Old Index