#1 crmdiags run doesn't return private data

v0.1.0
closed-fixed
7
2002-08-01
2002-07-12
Daniel Stekloff
No

The diagnostic manager doesn't return private data to
driver on executing "run", instead it returns NULL. Drivers
register private data to know what device is to run the
diagnostics. The private data is passed in when driver
registers with the diagnostic manager. The manager
should return the private data with the "run" call.

Proposed patch:

---
linux-2.4.18-evlog/drivers/crms/crmdiags/rundiags.c
Fri Jul 12 19:16:53 2002
+++ linux/drivers/crms/crmdiags/rundiags.c Fri Jul 12
00:28:56 2002
@@ -159,7 +159,9 @@

ret = parse_command(subsys, buf, size);
if (ret == 0) {
- ret = subsys->diags->run(NULL,
subsys->args_sz, subsys->args,
+ struct diag_resource *rsrc=NULL;
+ rsrc = find_resource(subsys,
entry->rsrc_name);
+ ret = subsys->diags->run(rsrc ?
rsrc->private_data : NULL, subsys->args_sz,
subsys->args,
&subsys->result, subsys->test_id);
if (ret == 0) {
subsys->state = DONE;

Discussion

  • Logged In: YES
    user_id=406340

    Fixed in v0.1.1

     
    • status: open --> closed-fixed