Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 May 2019 08:17:29 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r347015 - head/sys/compat/linsysfs
Message-ID:  <201905020817.x428HT1v009085@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Thu May  2 08:17:29 2019
New Revision: 347015
URL: https://svnweb.freebsd.org/changeset/base/347015

Log:
  Add sys/devices/system/cpu/{possible,present} to linsysfs(5).
  That makes Linux lscpu(1) work.
  
  Reviewed by:	dchagin
  MFC after:	2 weeks
  Sponsored by:	The FreeBSD Foundation
  Differential Revision:	https://reviews.freebsd.org/D20131

Modified:
  head/sys/compat/linsysfs/linsysfs.c

Modified: head/sys/compat/linsysfs/linsysfs.c
==============================================================================
--- head/sys/compat/linsysfs/linsysfs.c	Thu May  2 04:16:46 2019	(r347014)
+++ head/sys/compat/linsysfs/linsysfs.c	Thu May  2 08:17:29 2019	(r347015)
@@ -436,7 +436,7 @@ linsysfs_run_bus(device_t dev, struct pfs_node *dir, s
 }
 
 /*
- * Filler function for sys/devices/system/cpu/online
+ * Filler function for sys/devices/system/cpu/{online,possible,present}
  */
 static int
 linsysfs_cpuonline(PFS_FILL_ARGS)
@@ -532,6 +532,10 @@ linsysfs_init(PFS_INIT_ARGS)
 	cpu = pfs_create_dir(sys, "cpu", NULL, NULL, NULL, 0);
 
 	pfs_create_file(cpu, "online", &linsysfs_cpuonline,
+	    NULL, NULL, NULL, PFS_RD);
+	pfs_create_file(cpu, "possible", &linsysfs_cpuonline,
+	    NULL, NULL, NULL, PFS_RD);
+	pfs_create_file(cpu, "present", &linsysfs_cpuonline,
 	    NULL, NULL, NULL, PFS_RD);
 
 	linsysfs_listcpus(cpu);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905020817.x428HT1v009085>