Changeset 36145
- Timestamp:
- Sep 23, 2013, 12:53:45 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20130904/Ohana/src/opihi/pantasks/CheckController.c
r23530 r36145 29 29 if (p != NULL) goto escape; 30 30 31 /** skip past any leading garbage? ***/ 32 33 /** find "Njobs: **/ 34 p = memstr (buffer.buffer, "BEGIN BLOCK Njobs:", MIN(buffer.Nbuffer, 256)); 35 p += strlen("BEGIN BLOCK Njobs:"); 36 31 37 /** parse job list **/ 32 status = sscanf ( buffer.buffer, "%*s%d", &Njobs);38 status = sscanf (p, "%d", &Njobs); 33 39 if (status != 1) goto escape; 34 40 if (VerboseMode()) gprint (GP_ERR, "parse %d jobs on stack %f\n", Njobs, TimerElapsed(&start, TRUE)); 35 41 36 p = buffer.buffer; 42 /* output looks like: 43 BEGIN BLOCK Njobs: NN\n 44 ID name machine\n 45 ID name machine\n 46 */ 47 48 // p is currently pointing at "BEGIN BLOCK Njobs" 49 37 50 for (i = 0; i < Njobs; i++) { 38 51 q = strchr (p, '\n'); … … 67 80 if (p != NULL) goto escape; 68 81 82 /** skip past any leading garbage? ***/ 83 84 /** find "Njobs: **/ 85 p = memstr (buffer.buffer, "BEGIN BLOCK Njobs:", MIN(buffer.Nbuffer, 256)); 86 p += strlen("BEGIN BLOCK Njobs:"); 87 69 88 /** parse job list **/ 70 status = sscanf ( buffer.buffer, "%*s%d", &Njobs);89 status = sscanf (p, "%d", &Njobs); 71 90 if (status != 1) goto escape; 72 91 if (VerboseMode()) gprint (GP_ERR, "check crash stack %f\n", TimerElapsed(&start, TRUE)); 73 92 74 p = buffer.buffer; 93 /* output looks like: 94 BEGIN BLOCK Njobs: NN\n 95 ID name machine\n 96 ID name machine\n 97 */ 98 99 // p is currently pointing at "BEGIN BLOCK Njobs" 100 75 101 for (i = 0; i < Njobs; i++) { 76 102 q = strchr (p, '\n');
Note:
See TracChangeset
for help on using the changeset viewer.
