Re: Formatting time in kernel
- From: Ulf Lilleengen <lulf@xxxxxxxxxxxx>
- Date: Wed, 31 May 2006 11:24:19 +0200
On Tue, May 30, 2006 at 07:17:45PM -0500, Rick C. Petty wrote:
On Fri, May 26, 2006 at 10:59:18PM +0200, Ulf Lilleengen wrote:I agree, but currently the output list, printconfig and those are heavily
I've been looking through the kernel code the past few days, but I have not found
what I'm looking for, which is a way to format "struct timeval" for output
in the same matter as the ctime(3) in the standard libc. I keep thinking how this part of the code
should not be in kernel because of this, but things will be vastly more
complicated if not because of the whole gvinum structure. (This is for use in
the gvinum dumpconfig option I'm working on, and I'm not sure if it's really that important
showing the creation time, but that's a different discussion).
Why can't you just pass the struct timeval up to the userland tool and have
gvinum call ctime? Or at the very least pass up a time_t. Maybe go the
other route and pass up the whole gv_label (I'm assuming this is the
structure you're talking about).. /sbin/gvinum already has to include
vinum/geom_vinum_var.h so it's not like it's very kernel-specific (e.g.
#ifdef KERNEL). I personally feel that stuff like this belongs in userland
not kernel, parsing or converting times, etc.
formatted in the kernel, so I was just looking for the easy way out as a
temporate solution. However, I intend to pass the whole configuration to userland, not just the
label, and let the tools format it there, as I see to this point see no reason
for it to be in the kernel.
--
Mvh Ulf Lilleengen
_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"
- References:
- Formatting time in kernel
- From: Ulf Lilleengen
- Formatting time in kernel
- Prev by Date: clamd+libunrar signal 4: how to debug?
- Next by Date: Re: [ANN] unionfs patchset-13 release
- Previous by thread: Formatting time in kernel
- Next by thread: Trouble debugging a kernel dump (kgdb: kvm_read: invalid address)
- Index(es):
Relevant Pages
|
|