File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -35,13 +35,13 @@ string LinuxParser::OperatingSystem() {
35
35
36
36
// DONE: An example of how to read data from the filesystem
37
37
string LinuxParser::Kernel () {
38
- string os, kernel;
38
+ string os, kernel, version ;
39
39
string line;
40
40
std::ifstream stream (kProcDirectory + kVersionFilename );
41
41
if (stream.is_open ()) {
42
42
std::getline (stream, line);
43
43
std::istringstream linestream (line);
44
- linestream >> os >> kernel;
44
+ linestream >> os >> version >> kernel;
45
45
}
46
46
return kernel;
47
47
}
@@ -112,4 +112,4 @@ string LinuxParser::User(int pid[[maybe_unused]]) { return string(); }
112
112
113
113
// TODO: Read and return the uptime of a process
114
114
// REMOVE: [[maybe_unused]] once you define the function
115
- long LinuxParser::UpTime (int pid[[maybe_unused]]) { return 0 ; }
115
+ long LinuxParser::UpTime (int pid[[maybe_unused]]) { return 0 ; }
You can’t perform that action at this time.
0 commit comments