search for: status_t

Displaying 11 results from an estimated 11 matches for "status_t".

Did you mean: status_r
2010 Mar 15
0
[PATCH] Updated the list of ignored files and fixed whitespace issues.
...host->memory = info.memory; } } - virConnectClose(connection); + virConnectClose(connection); host->beeping = false; } @@ -228,16 +228,16 @@ void HostWrapper::shutdown() system("shutdown -h now"); } -Manageable::status_t -HostWrapper::ManagementMethod(uint32_t methodId, Args& args, string& text) +Manageable::status_t +HostWrapper::ManagementMethod(uint32_t methodId, Args& args, string& text) { switch(methodId) { case _qmf::Host::METHOD_SHUTDOWN: - shutdown(); - return Manage...
2010 Mar 16
0
[PATCH] Added the new Processors agent.
...: could not query processors via HAL."); + + // populate the managed object's values + management_object->set_model(libhal_device_get_property_string(context, processors[0], "info.product", &dbus_error)); + management_object->set_cores(num_results); +} + +Manageable::status_t +ProcessorsAgent::ManagementMethod(uint32_t id, Args& args, string& text) +{ + switch(id) + { + case _qmf::Processors::METHOD_GET_LOAD_AVERAGE: + _qmf::ArgsProcessorsGet_load_average& loadavg = (_qmf::ArgsProcessorsGet_load_average&) args; + loadavg.o_ret = get_load...
2010 Mar 22
1
Small change and resend...
This patch includes one small change: the Processors::get_load_average() method is now const since it does not change the object's state.
2010 Apr 15
1
[PATCH matahari] Refactored the Host agent.
...eton = host; - return hostSingleton; + // Close the Hal Context + put_hal_ctx(hal_ctx); } -void HostWrapper::reboot() +void +HostAgent::update(void) { - system("shutdown -r now"); -} - -void HostWrapper::shutdown() -{ - system("shutdown -h now"); -} - -Manageable::status_t -HostWrapper::ManagementMethod(uint32_t methodId, Args& args, string& text) -{ - switch(methodId) { - case _qmf::Host::METHOD_SHUTDOWN: - shutdown(); - return Manageable::STATUS_OK; - case _qmf::Host::METHOD_REBOOT: - reboot(); -...
2010 May 24
0
[PATCH matahari] Moves the CPU properties into the Host API space.
...t_arch(_host.getArchitecture()); _management_object->set_memory(_host.getMemory()); _management_object->set_beeping(_host.isBeeping()); + + _management_object->set_cpu_model(_host.getCPUModel()); + _management_object->set_cpu_cores(_host.getNumberOfCPUCores()); } Manageable::status_t @@ -63,6 +66,12 @@ HostAgent::ManagementMethod(uint32_t method, Args& arguments, string& text) } void +HostAgent::updated() +{ + _management_object->set_load_average(_host.getLoadAverage()); +} + +void HostAgent::heartbeat(unsigned long timestamp) { } diff --git a/src/qmf/hostage...
2010 May 13
0
[PATCH matahari] Moving QMF functionality into a transport layer.
...>get_hostname()); + _management_object->set_hypervisor(_host->get_hypervisor()); + _management_object->set_arch(_host->get_architecture()); + _management_object->set_memory(_host->get_memory()); + _management_object->set_beeping(_host->is_beeping()); +} + +Manageable::status_t +HostAgent::ManagementMethod(uint32_t method, Args& arguments, string& text) +{ + switch(method) + { + case _qmf::Host::METHOD_SHUTDOWN: + _host->shutdown(); + return Manageable::STATUS_OK; + case _qmf::Host::METHOD_REBOOT: + _host->reboot(); + return Man...
2010 May 19
2
Squashed commits...
Refactoring the previous patch ended up creating two deltas. This patch pushes them both together into a single commit.
2010 Apr 26
0
[PATCH matahari] Created the NetworkDevice agent.
...- - strncpy(ifr.ifr_name, interfaceName.c_str(), IFNAMSIZ - 1); - ifr.ifr_data = (caddr_t)&edata; - - sock = socket(AF_INET, SOCK_DGRAM, 0); - ret = ioctl(sock, SIOCETHTOOL, &ifr); - close(sock); - - if (ret != 0) - ret = errno; - - return ret; -} - -Manageable::status_t -NICWrapper::ManagementMethod(uint32_t methodId, Args& args, string& text) -{ - switch (methodId) { - case _qmf::NIC::METHOD_IDENTIFY_NIC: - _qmf::ArgsNICIdentify_nic& ioArgs = (_qmf::ArgsNICIdentify_nic&) args; - int seconds = ioArgs.i_seconds; -...
2011 Oct 03
2
patch: Replace many usleep and some sleep calls with nanosleep
..._command(const char *bu upsdebug_hex(3, "send", buf, bufsize); - usleep(100000); + struct timespec delay = {0, 100e6}; nanosleep(&delay, NULL); ret = ser_get_buf_len(upsfd, powpan_answer, bufsize-1, SER_WAIT_SEC, SER_WAIT_USEC); @@ -427,7 +427,7 @@ static int powpan_status(status_t *statu upsdebug_hex(3, "send", "D\r", 2); - usleep(200000); + struct timespec delay = {0, 200e6}; nanosleep(&delay, NULL); ret = ser_get_buf_len(upsfd, status, sizeof(*status), SER_WAIT_SEC, SER_WAIT_USEC); @@ -576,7 +576,7 @@ static int powpan_initups(void)...
2010 Apr 26
2
Patch supercedes previous patch...
In looking at the code I realized that the last of the HAL depenencies were removed with this patch. So, I'm pushing an updated patch that contains none of the HAL code in it.
2010 Apr 19
1
[PATCH matahari] Removes all code for the previous CPUWrapper class.
...vendor = vendor__; - flags = flags__; - } - -public: - - // Factory like method - static void fillCPUInfo(vector<CPUWrapper*> &cpus, ManagementAgent *agent); - - // QMF Methods - ManagementObject* GetManagementObject(void) const { return mgmt_object; } - - status_t ManagementMethod(uint32_t methodId, Args& args, string& text) { - return STATUS_NOT_IMPLEMENTED; - } - - // Field Accessors - int getCpunum(void) { return cpunum; } - int getCorenum(void) { return corenum; } - int getNumcores(void) { return numcores; } - - int getMo...