mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-04 16:26:46 +00:00
Fix Linux 'platform status' command. Its output is now closer to that on Mac OS X
- resolves llvm.org/pr14806 Patch by Matthew Sorrels! llvm-svn: 182030
This commit is contained in:
parent
072d47b67f
commit
3be69dac8d
@ -336,12 +336,14 @@ PlatformLinux::GetStatus (Stream &strm)
|
||||
{
|
||||
struct utsname un;
|
||||
|
||||
if (uname(&un)) {
|
||||
strm << "Linux";
|
||||
return;
|
||||
}
|
||||
Platform::GetStatus(strm);
|
||||
|
||||
strm << un.sysname << ' ' << un.release << ' ' << un.version << '\n';
|
||||
if (uname(&un))
|
||||
return;
|
||||
|
||||
strm.Printf (" Kernel: %s\n", un.sysname);
|
||||
strm.Printf (" Release: %s\n", un.release);
|
||||
strm.Printf (" Version: %s\n", un.version);
|
||||
}
|
||||
|
||||
size_t
|
||||
|
@ -27,7 +27,6 @@ class PlatformCommandTestCase(TestBase):
|
||||
self.expect("platform process info", error=True,
|
||||
substrs = ['one or more process id(s) must be specified'])
|
||||
|
||||
@expectedFailureLinux # due to llvm.org/pr14806 -- "platform status" prints more information on Mac OS X than on Linux
|
||||
def test_status(self):
|
||||
self.expect("platform status",
|
||||
substrs = ['Platform', 'Triple', 'OS Version', 'Kernel', 'Hostname'])
|
||||
|
Loading…
x
Reference in New Issue
Block a user