PATCH: Implements /proc/cpuinfo and /proc/partitions

Chris January chris@atomice.net
Thu Mar 6 22:58:00 GMT 2003


> On Sun, Mar 02, 2003 at 12:50:51PM -0000, Chris January wrote:
> > 2003-03-01  Christopher January  <chris@atomice.net>
> > 
> > 	* autoload.cc (GetSystemTimes): Define new autoload function. 
> > 	* fhandler_proc.cc (proc_listing): Add cpuinfo and 
> partitions entries.
> > 	(fhandler_proc::fill_filebuf): Add PROC_CPUINFO and 
> PROC_PARTITIONS cases.
> > 	(format_proc_uptime): Use GetSystemTimes if available.
> > 	(read_value): New macro.
> > 	(print): New macro.
> > 	(cpuid): New function.
> > 	(can_set_flag): New function.
> > 	(format_proc_cpuinfo): New function.
> > 	(format_proc_partitions): New function.
> > 	* w32api/include/winbase.h (FindFirstVolume): Add declaration.
> > 	(FindNextVolume): Add declaration.
> > 	(FindVolumeClose): Add declaration.
> > 	(GetSystemTimes): Add declaration.
> > 	* w32api/include/winnt.h: Add define for 
> PF_XMMI64_INSTRUCTIONS_AVAILABLE.
> 
> I tried this patch and it works nicely but the patch creates a couple of
> warnings at compile time:
> 
> fhandler_proc.cc: In function `off_t format_proc_cpuinfo(char*, 
> unsigned int)':
> fhandler_proc.cc:683: warning: unused variable `unsigned int 
> extended_family'
> fhandler_proc.cc:684: warning: unused variable `unsigned int 
> extended_model'
> fhandler_proc.cc:672: warning: unused variable `unsigned int cpuid_sig'
> fhandler_proc.cc:672: warning: unused variable `unsigned int extra_info'
> fhandler_proc.cc:672: warning: unused variable `unsigned int features'
> fhandler_proc.cc:625: warning: unused variable `int cpu'
> fhandler_proc.cc:625: warning: unused variable `int r1'
> fhandler_proc.cc:625: warning: unused variable `int r2'
> fhandler_proc.cc: In function `off_t 
> format_proc_partitions(char*, unsigned int)':
> fhandler_proc.cc:906: warning: comparison between signed and 
> unsigned integer expressions
> 
> Would you mind to send a new patch w/o these warnings?

Attached. w32api patch is now seperated.

2003-03-06  Christopher January  <chris@atomice.net>

	* autoload.cc (GetSystemTimes): Define new autoload function. 
	* fhandler_proc.cc (proc_listing): Add cpuinfo and partitions entries.
	(fhandler_proc::fill_filebuf): Add PROC_CPUINFO and PROC_PARTITIONS cases.
	(format_proc_uptime): Use GetSystemTimes if available.
	(read_value): New macro.
	(print): New macro.
	(cpuid): New function.
	(can_set_flag): New function.
	(format_proc_cpuinfo): New function.
	(format_proc_partitions): New function.

2003-03-06  Christopher January  <chris@atomice.net>

	* include/winbase.h (FindFirstVolume): Add declaration.
	(FindNextVolume): Add declaration.
	(FindVolumeClose): Add declaration.
	(GetSystemTimes): Add declaration.
	* include/winnt.h: Add define for PF_XMMI64_INSTRUCTIONS_AVAILABLE.

Chris
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cpuinfo_partitions.ChangeLog.txt
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20030306/09571af4/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cpuinfo_partitions.patch
Type: application/octet-stream
Size: 20961 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20030306/09571af4/attachment.obj>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cpuinfo_partitions_w32api.ChangeLog.txt
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20030306/09571af4/attachment-0001.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cpuinfo_partitions_w32api.patch
Type: application/octet-stream
Size: 3379 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20030306/09571af4/attachment-0001.obj>


More information about the Cygwin-patches mailing list